LetsEncrypt to use Apache if myVesta is behind main nginx

This commit is contained in:
myvesta 2020-06-12 22:46:08 +02:00 committed by GitHub
commit d0e24ed92f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,6 +158,14 @@ for auth in $authz; do
check_result $? "DNS _acme-challenge record wasn't created" check_result $? "DNS _acme-challenge record wasn't created"
else else
if [ "$WEB_SYSTEM" = 'nginx' ] || [ ! -z "$PROXY_SYSTEM" ]; then if [ "$WEB_SYSTEM" = 'nginx' ] || [ ! -z "$PROXY_SYSTEM" ]; then
if [ -f "/usr/local/vesta/web/inc/nginx_proxy" ]; then
# if vesta is behind main nginx
well_known="$HOMEDIR/$user/web/$domain/public_html/.well-known"
acme_challenge="$well_known/acme-challenge"
mkdir -p $acme_challenge
echo "$token.$THUMB" > $acme_challenge/$token
chown -R $user:$user $well_known
fi
conf="$HOMEDIR/$user/conf/web/nginx.$domain.conf_letsencrypt" conf="$HOMEDIR/$user/conf/web/nginx.$domain.conf_letsencrypt"
sconf="$HOMEDIR/$user/conf/web/snginx.$domain.conf_letsencrypt" sconf="$HOMEDIR/$user/conf/web/snginx.$domain.conf_letsencrypt"
if [ ! -e "$conf" ]; then if [ ! -e "$conf" ]; then