File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ if [ "$SSL" != 'yes' ]; then
4343fi
4444
4545# Check if proxy is active
46- if [ ! -z " $PROXY_SYSTEM " ] || [ ! -z " $PROXY " ] ; then
46+ if [ ! -z " $PROXY_SYSTEM " ]; then
4747 if ! grep --quiet " forcessl" $HESTIA /data/templates/web/nginx/default.tpl; then
4848 $BIN /v-update-web-templates
4949 fi
5656fi
5757
5858# Insert redirect commands
59- if [ ! -z $PROXY ]; then
59+ if [ ! -z " $PROXY_SYSTEM " ] || [ " $WEB_SYSTEM " = ' nginx ' ]; then
6060 echo ' return 301 https://$host$request_uri;' > $forcessl
6161else
6262 echo ' RewriteEngine On' > $forcessl
Original file line number Diff line number Diff line change @@ -38,8 +38,12 @@ is_object_valid 'web' 'DOMAIN' "$domain" "$FORCESSL"
3838eval $( grep " DOMAIN='$domain '" $USER_DATA /web.conf)
3939
4040# Remove forcessl configs
41- rm -f $HOMEDIR /$user /conf/web/$domain /$WEB_SYSTEM .forcessl.conf
42- rm -f $HOMEDIR /$user /conf/web/$domain /$PROXY_SYSTEM .forcessl.conf
41+ if [ -f $HOMEDIR /$user /conf/web/$domain /$WEB_SYSTEM .forcessl.conf ]; then
42+ rm -f $HOMEDIR /$user /conf/web/$domain /$WEB_SYSTEM .forcessl.conf
43+ fi
44+ if [ -f $HOMEDIR /$user /conf/web/$domain /$PROXY_SYSTEM .forcessl.conf ]; then
45+ rm -f $HOMEDIR /$user /conf/web/$domain /$PROXY_SYSTEM .forcessl.conf
46+ fi
4347
4448# ----------------------------------------------------------#
4549# Hestia #
You can’t perform that action at this time.
0 commit comments