Explorar o código

Allow checking of nginx domains with force-https

Fixes issue noted in serghey-rodin/vesta#979
Kevin Mark %!s(int64=9) %!d(string=hai) anos
pai
achega
d4a4bca616
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      bin/v-check-letsencrypt-domain

+ 4 - 0
bin/v-check-letsencrypt-domain

@@ -89,12 +89,16 @@ uri=$(echo "$answer" |grep -A 3 http-01 |grep uri |cut -f 4 -d \")
 # Adding location wrapper for request challenge
 # Adding location wrapper for request challenge
 if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
 if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
     conf="$HOMEDIR/$user/conf/web/nginx.$r_domain.conf_letsencrypt"
     conf="$HOMEDIR/$user/conf/web/nginx.$r_domain.conf_letsencrypt"
+    sconf="$HOMEDIR/$user/conf/web/snginx.$r_domain.conf_letsencrypt"
     if [ ! -e "$conf" ]; then
     if [ ! -e "$conf" ]; then
         echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' > $conf
         echo 'location ~ "^/\.well-known/acme-challenge/(.*)$" {' > $conf
         echo '    default_type text/plain;' >> $conf
         echo '    default_type text/plain;' >> $conf
         echo '    return 200 "$1.'$thumb'";' >> $conf
         echo '    return 200 "$1.'$thumb'";' >> $conf
         echo '}' >> $conf
         echo '}' >> $conf
     fi
     fi
+    if [ ! -e "$sconf" ]; then
+        ln -s "$conf" "$sconf"
+    fi
 else
 else
     acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge"
     acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge"
     mkdir -p $acme
     mkdir -p $acme