mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Merge pull request #1037 from kmark/fix-letsenc-errors
Let's Encrypt fixes for #979 (invalid response) and #1008 (/tmp/*/domain.tld.crt file not found)
This commit is contained in:
commit
605dae8774
2 changed files with 5 additions and 1 deletions
|
@ -89,12 +89,16 @@ uri=$(echo "$answer" |grep -A 3 http-01 |grep uri |cut -f 4 -d \")
|
|||
# Adding location wrapper for request challenge
|
||||
if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
|
||||
conf="$HOMEDIR/$user/conf/web/nginx.$r_domain.conf_letsencrypt"
|
||||
sconf="$HOMEDIR/$user/conf/web/snginx.$r_domain.conf_letsencrypt"
|
||||
if [ ! -e "$conf" ]; then
|
||||
echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' > $conf
|
||||
echo ' default_type text/plain;' >> $conf
|
||||
echo ' return 200 "$1.'$thumb'";' >> $conf
|
||||
echo '}' >> $conf
|
||||
fi
|
||||
if [ ! -e "$sconf" ]; then
|
||||
ln -s "$conf" "$sconf"
|
||||
fi
|
||||
else
|
||||
acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge"
|
||||
if [ ! -d "$acme" ]; then
|
||||
|
|
|
@ -279,7 +279,7 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
|
||||
// Change SSL certificate
|
||||
if (( $v_letsencrypt == 'no' ) && ( $v_ssl == 'yes' ) && (!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) {
|
||||
if (( $v_letsencrypt == 'no' ) && (empty($_POST['v_letsencrypt'])) && ( $v_ssl == 'yes' ) && (!empty($_POST['v_ssl'])) && (empty($_SESSION['error_msg']))) {
|
||||
if (( $v_ssl_crt != str_replace("\r\n", "\n", $_POST['v_ssl_crt'])) || ( $v_ssl_key != str_replace("\r\n", "\n", $_POST['v_ssl_key'])) || ( $v_ssl_ca != str_replace("\r\n", "\n", $_POST['v_ssl_ca']))) {
|
||||
exec ('mktemp -d', $mktemp_output, $return_var);
|
||||
$tmpdir = $mktemp_output[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue