From b0c07020db79c39224b7d8d5fdf7934b8b1f80f9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 18 Jul 2016 22:19:27 +0300 Subject: [PATCH] fix for empty web domain alias --- bin/v-add-web-domain | 5 +++-- web/add/web/index.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index 5995692b..04fa9afc 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -121,9 +121,10 @@ if [ ! -z "$WEB_BACKEND" ]; then fi # Preparing domain variables -ALIAS="$aliases" if [ "$aliases" != 'none' ]; then ALIAS="www.$domain,$aliases,$(get_ip_alias $domain)" +else + ALIAS='' fi prepare_web_domain_values @@ -157,7 +158,7 @@ time=$(echo "$time_n_date" |cut -f 1 -d \ ) date=$(echo "$time_n_date" |cut -f 2 -d \ ) # Adding domain in web.conf -echo "DOMAIN='$domain' IP='$ip' IP6='' ALIAS='$aliases' TPL='$WEB_TEMPLATE' \ +echo "DOMAIN='$domain' IP='$ip' IP6='' ALIAS='$ALIAS' TPL='$WEB_TEMPLATE' \ SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5='' BACKEND='$BACKEND_TEMPLATE' \ PROXY='$PROXY_TEMPLATE' PROXY_EXT='$PROXY_EXT' STATS='' STATS_USER='' \ STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no' \ diff --git a/web/add/web/index.php b/web/add/web/index.php index 4da15024..d57a46ad 100644 --- a/web/add/web/index.php +++ b/web/add/web/index.php @@ -58,6 +58,7 @@ if (!empty($_POST['ok'])) { $aliases_arr = array_filter($aliases_arr); $aliases = implode(",",$aliases_arr); $aliases = escapeshellarg($aliases); + if (empty($_POST['v_aliases'])) $aliases = 'none'; // Define proxy extensions $v_proxy_ext = $_POST['v_proxy_ext'];