Skip to content

Commit 9784389

Browse files
committed
ssl vhost in case when nginx is disabled
1 parent 82c3bad commit 9784389

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

func/rebuild.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ rebuild_web_domain_conf() {
254254

255255
# Checking SSL
256256
if [ "$SSL" = 'yes' ]; then
257+
257258
# Adding domain to the web conf
258259
conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
259260
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
@@ -288,16 +289,21 @@ rebuild_web_domain_conf() {
288289
add_web_config
289290
chown root:$user $conf
290291
chmod 640 $conf
292+
proxy_change='yes'
293+
fi
291294

292-
if [ "$SSL" = 'yes' ]; then
293-
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
294-
conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
295-
add_web_config
296-
chown root:$user $conf
297-
chmod 640 $conf
295+
if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ]; then
296+
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
297+
if [ -z "$PROXY" ]; then
298+
tpl_file="$WEBTPL/$PROXY_SYSTEM/default.stpl"
298299
fi
300+
conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
301+
add_web_config
302+
chown root:$user $conf
303+
chmod 640 $conf
299304
proxy_change='yes'
300305
fi
306+
301307
if [ "$SUSPENDED" = 'yes' ]; then
302308
suspended_web=$((suspended_web + 1))
303309
fi

0 commit comments

Comments
 (0)