From 9784389766f230bf9e1aed9fa12bc7be21ec098c Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Fri, 21 Jun 2013 17:54:00 +0300 Subject: [PATCH] ssl vhost in case when nginx is disabled --- func/rebuild.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/func/rebuild.sh b/func/rebuild.sh index a0ccb5df8..929b5a6f6 100644 --- a/func/rebuild.sh +++ b/func/rebuild.sh @@ -254,6 +254,7 @@ rebuild_web_domain_conf() { # Checking SSL if [ "$SSL" = 'yes' ]; then + # Adding domain to the web conf conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf" tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl" @@ -288,16 +289,21 @@ rebuild_web_domain_conf() { add_web_config chown root:$user $conf chmod 640 $conf - - if [ "$SSL" = 'yes' ]; then - tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" - conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf" - add_web_config - chown root:$user $conf - chmod 640 $conf - fi proxy_change='yes' fi + + if [ ! -z "$PROXY_SYSTEM" ] && [ "$SSL" = 'yes' ]; then + tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl" + if [ -z "$PROXY" ]; then + tpl_file="$WEBTPL/$PROXY_SYSTEM/default.stpl" + fi + conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf" + add_web_config + chown root:$user $conf + chmod 640 $conf + proxy_change='yes' + fi + if [ "$SUSPENDED" = 'yes' ]; then suspended_web=$((suspended_web + 1)) fi