diff --git a/bin/v_add_web_domain_alias b/bin/v_add_web_domain_alias index 0e3449b63..d672ff1ae 100755 --- a/bin/v_add_web_domain_alias +++ b/bin/v_add_web_domain_alias @@ -73,7 +73,7 @@ is_package_full 'web_alias' # Parsing domain values get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" # Parsing domain aliases if [ -z "$ALIAS" ]; then @@ -91,7 +91,7 @@ add_web_config if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi @@ -99,14 +99,14 @@ fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config add_web_config if [ "$SSL" = 'yes' ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config add_web_config fi diff --git a/bin/v_add_web_domain_cgi b/bin/v_add_web_domain_cgi index ff85ec5ad..49c51f445 100755 --- a/bin/v_add_web_domain_cgi +++ b/bin/v_add_web_domain_cgi @@ -60,7 +60,7 @@ is_web_domain_key_empty '$CGI' # Parsing domain values get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" CGI='yes' # Preparing domain values for the template substitution @@ -73,7 +73,7 @@ add_web_config # Checking ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi diff --git a/bin/v_add_web_domain_elog b/bin/v_add_web_domain_elog index dfef74536..df3d2a61a 100755 --- a/bin/v_add_web_domain_elog +++ b/bin/v_add_web_domain_elog @@ -58,7 +58,7 @@ is_web_domain_key_empty '$ELOG' # Parsing domain values get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" ELOG='yes' # Preparing domain values for the template substitution @@ -71,7 +71,7 @@ add_web_config # Checking ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi @@ -79,14 +79,14 @@ fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config add_web_config if [ "$SSL" = 'yes' ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config add_web_config fi diff --git a/bin/v_backup_user b/bin/v_backup_user index 26c80fde0..3794da319 100755 --- a/bin/v_backup_user +++ b/bin/v_backup_user @@ -156,15 +156,12 @@ then for domain in $web_list; do echo -e "$(date "+%F %T") $domain" - # Building directory tree mkdir -p $tmpdir/web/$domain/conf - mkdir -p $tmpdir/web/$domain/ssl # Defining domain variables domain_idn=$(idn -t --quiet -a "$domain") get_web_domain_values - # Packing data folders cd $V_HOME/$user/web/$domain tar -cf $tmpdir/web/$domain/$domain.tar \ @@ -173,20 +170,20 @@ then # Creating web.config cd $tmpdir/web/$domain/ conf="$V_USERS/$user/web.conf" - grep "DOMAIN='$domain'" $conf > conf/web.conf + grep "DOMAIN='$domain'" $conf > conf/vesta.conf # Apache config if [ "$WEB_SYSTEM" = 'apache' ]; then # Parsing httpd.conf tpl_file="$V_WEBTPL/apache_$TPL.tpl" - conf="$V_HOME/$user/conf/httpd.conf" + conf="$V_HOME/$user/conf/web/httpd.conf" get_web_config_brds sed -n "$top_line,$bottom_line p" $conf > conf/httpd.conf # SSL check if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" get_web_config_brds sed -n "$top_line,$bottom_line p" $conf > conf/shttpd.conf fi @@ -195,30 +192,30 @@ then # Nginx config if [ ! -z "$NGINX" ] ; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" get_web_config_brds sed -n "$top_line,$bottom_line p" $conf > conf/nginx.conf # SSL check if [ "$SSL" = 'yes' ] ; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" get_web_config_brds sed -n "$top_line,$bottom_line p" $conf > conf/snginx.conf fi fi # Suplemental configs - for sconfig in $(ls $V_HOME/$user/conf/|grep ".$domain.conf"); do - cp $V_HOME/$user/conf/$sconfig conf/ + for sconfig in $(ls $V_HOME/$user/conf/web/|grep ".$domain.conf"); do + cp $V_HOME/$user/conf/web/$sconfig conf/ done # SSL Certificates if [ "$SSL" = 'yes' ] ; then - cp $V_HOME/$user/conf/ssl.$domain.* ssl/ + cp $V_HOME/$user/conf/web/ssl.$domain.* conf/ fi - tar -rf $tmpdir/web/$domain/$domain.tar conf ssl + tar -rf $tmpdir/web/$domain/$domain.tar conf mv $tmpdir/web/$domain/$domain.tar $tmpdir/web/ rm -rf $tmpdir/web/$domain @@ -263,7 +260,7 @@ then # Backingup dns recods cp $V_USERS/$user/dns/$domain $domain - cp /etc/namedb/$domain.db $domain.db + cp $V_USERS/$user/conf/dns/$domain.db $domain.db done echo fi diff --git a/bin/v_change_web_domain_ip b/bin/v_change_web_domain_ip index aa2707504..5e674ae04 100755 --- a/bin/v_change_web_domain_ip +++ b/bin/v_change_web_domain_ip @@ -60,7 +60,7 @@ is_ip_avalable # Define variable for replace get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" old=$IP new=$ip replace_web_config @@ -68,21 +68,21 @@ replace_web_config # Checking ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" replace_web_config fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" replace_web_config fi # Checking nginx if [ "$SSL" = 'yes' ] && [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" replace_web_config fi diff --git a/bin/v_change_web_domain_tpl b/bin/v_change_web_domain_tpl index 782f4da77..bbd09cd43 100755 --- a/bin/v_change_web_domain_tpl +++ b/bin/v_change_web_domain_tpl @@ -63,13 +63,13 @@ get_web_domain_values # Deleting domain tpl_file="$V_WEBTPL/apache_$TPL.tpl" old_tpl=$TPL -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" del_web_config # Deleting ssl vhost if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config fi @@ -79,7 +79,7 @@ email="$user@$domain" group="$user" docroot="$V_HOME/$user/web/$domain/public_html" docroot_string="DocumentRoot $docroot" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" tpl_file="$V_WEBTPL/apache_$template.tpl" @@ -147,18 +147,18 @@ fi # Checking ssl if [ "$SSL" = 'yes' ]; then # Defining SSL vars - ssl_crt="$V_HOME/$user/conf/ssl.$domain.crt" - ssl_key="$V_HOME/$user/conf/ssl.$domain.key" - ssl_pem="$V_HOME/$user/conf/ssl.$domain.pem" - ssl_ca="$V_HOME/$user/conf/ssl.$domain.ca" - if [ ! -e "$V_USERS/$user/ssl/$domain.ca" ]; then + ssl_crt="$V_HOME/$user/conf/web/ssl.$domain.crt" + ssl_key="$V_HOME/$user/conf/web/ssl.$domain.key" + ssl_pem="$V_HOME/$user/conf/web/ssl.$domain.pem" + ssl_ca="$V_HOME/$user/conf/web/ssl.$domain.ca" + if [ ! -e "$V_USERS/$user/web/ssl/$domain.ca" ]; then ssl_ca_str='#' fi case $SSL_HOME in single) docroot="$V_HOME/$user/web/$domain/public_shtml" ;; same) docroot="$V_HOME/$user/web/$domain/public_html" ;; esac - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" tpl_file="$V_WEBTPL/apache_$template.stpl" # Adding domain to the httpd.conf diff --git a/bin/v_delete_web_domain b/bin/v_delete_web_domain index 19ee439fa..7be70e67f 100755 --- a/bin/v_delete_web_domain +++ b/bin/v_delete_web_domain @@ -58,7 +58,7 @@ is_domain_suspended 'web' # Get template name get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" # Deleting domain del_web_config @@ -66,50 +66,41 @@ del_web_config # Checking ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config # Deleting certificates - rm -f $V_HOME/$user/conf/ssl.$domain.* + rm -f $V_HOME/$user/conf/web/ssl.$domain.* rm -f $V_USERS/$user/ssl/$domain.* fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config if [ "$SSL" = 'yes' ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config fi fi # Checking stats if [ ! -z "$STATS" ] && [ "$STATS" != 'no' ]; then - # Parsing pipe line - line=$(grep -n "$STATS.$domain.conf" $V_QUEUE/stats.pipe | \ - cut -f 1 -d : | head -n 1 ) - - # Deleting pipe command - if [ ! -z "$line" ]; then - sed -i "$line d" $V_QUEUE/stats.pipe - fi - - # Deleteing config - rm -f $V_HOME/$user/conf/$STATS.$domain.conf + sed -i "/ $domain$/d" $V_QUEUE/stats.pipe + rm -f $V_HOME/$user/conf/web/$STATS.$domain.conf fi # Deleting directory rm -rf $V_HOME/$user/web/$domain # Deleting logs -rm -rf /var/log/httpd/domains/$domain.log* -rm -rf /var/log/httpd/domains/$domain.bytes -rm -rf /var/log/httpd/domains/$domain.error* +rm -f /var/log/httpd/domains/$domain.log* +rm -f /var/log/httpd/domains/$domain.bytes +rm -f /var/log/httpd/domains/$domain.error* #----------------------------------------------------------# @@ -122,14 +113,14 @@ del_web_domain # Checking last ssl domain ssl_dom=$(grep "SSL='yes'" $V_USERS/$user/web.conf | wc -l) if [ "$ssl_dom" -eq '0' ]; then - sed -i "s/ Include /#Include /" $V_HOME/$user/conf/httpd.conf + sed -i "s/ Include /#Include /" $V_HOME/$user/conf/web/httpd.conf fi # Checking last domain domains=$(wc -l $V_USERS/$user/web.conf|cut -f 1 -d ' ') if [ "$domains" -eq '0' ]; then conf='/etc/httpd/conf.d/vesta.conf' - line=$(grep -n "$V_HOME/$user/conf/httpd.conf" $conf | cut -f 1 -d : ) + line=$(grep -n "$V_HOME/$user/conf/web/httpd.conf" $conf | cut -f 1 -d : ) if [ ! -z "$line" ]; then sed -i "$line d" $conf fi @@ -140,19 +131,19 @@ conf='/etc/nginx/conf.d/vesta_users.conf' last_nginx=$(grep -v "NGINX=''" $V_USERS/$user/web.conf) last_snginx=$(echo "$last_nginx" | grep "SSL='yes'") if [ -z "$last_snginx" ]; then - sline=$(grep -n "$V_HOME/$user/conf/snginx.conf" $conf | cut -f 1 -d : ) + sline=$(grep -n "$V_HOME/$user/conf/web/snginx.conf" $conf |cut -f 1 -d :) if [ ! -z "$sline" ]; then sed -i "$sline d" $conf fi - rm -f $V_HOME/$user/conf/snginx.conf + rm -f $V_HOME/$user/conf/web/snginx.conf fi if [ -z "$last_nginx" ]; then - line=$(grep -n "$V_HOME/$user/conf/nginx.conf" $conf | cut -f 1 -d : ) + line=$(grep -n "$V_HOME/$user/conf/web/nginx.conf" $conf | cut -f 1 -d : ) if [ ! -z "$line" ]; then sed -i "$line d" $conf fi - rm -f $V_HOME/$user/conf/nginx.conf + rm -f $V_HOME/$user/conf/web/nginx.conf fi # Decreasing ip value diff --git a/bin/v_delete_web_domain_alias b/bin/v_delete_web_domain_alias index 26f791438..b17633c05 100755 --- a/bin/v_delete_web_domain_alias +++ b/bin/v_delete_web_domain_alias @@ -69,7 +69,7 @@ ALIAS=$(echo "$ALIAS" |\ sed -e "/^$/d"|\ sed -e ':a;N;$!ba;s/\n/,/g') tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" # Preparing domain values for the template substitution upd_web_domain_values @@ -80,7 +80,7 @@ add_web_config if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi @@ -88,14 +88,14 @@ fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config add_web_config if [ "$SSL" = 'yes' ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config add_web_config fi diff --git a/bin/v_delete_web_domain_cgi b/bin/v_delete_web_domain_cgi index a7c37e2e1..3ad31c2b2 100755 --- a/bin/v_delete_web_domain_cgi +++ b/bin/v_delete_web_domain_cgi @@ -59,7 +59,7 @@ is_web_domain_value_exist '$CGI' get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" CGI='no' # Preparing domain values for the template substitution @@ -72,7 +72,7 @@ add_web_config # Checking ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi diff --git a/bin/v_delete_web_domain_elog b/bin/v_delete_web_domain_elog index afd6d9b5d..afe78c52b 100755 --- a/bin/v_delete_web_domain_elog +++ b/bin/v_delete_web_domain_elog @@ -59,7 +59,7 @@ is_web_domain_value_exist '$ELOG' # Parsing domain values get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" ELOG='no' # Preparing domain values for the template substitution @@ -72,7 +72,7 @@ add_web_config # Checking ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi @@ -80,14 +80,14 @@ fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config add_web_config if [ "$SSL" = 'yes' ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config add_web_config fi diff --git a/bin/v_delete_web_domain_nginx b/bin/v_delete_web_domain_nginx index 022f1909d..9a8b31f9e 100755 --- a/bin/v_delete_web_domain_nginx +++ b/bin/v_delete_web_domain_nginx @@ -81,13 +81,13 @@ conf='/etc/nginx/conf.d/vesta_users.conf' last_nginx=$(grep -v "NGINX=''" $V_USERS/$user/web.conf) last_snginx=$(echo "$last_nginx" | grep "SSL='yes'") if [ -z "$last_snginx" ]; then - sed -i "/$user\/conf\/snginx.conf/d" $conf - rm -f $V_HOME/$user/conf/snginx.conf + sed -i "/$user\/conf\/web\/snginx.conf/d" $conf + rm -f $V_HOME/$user/conf/web/snginx.conf fi if [ -z "$last_nginx" ]; then - sed -i "/$user\/conf\/nginx.conf/d" $conf - rm -f $V_HOME/$user/conf/nginx.conf + sed -i "/$user\/conf\/web\/nginx.conf/d" $conf + rm -f $V_HOME/$user/conf/web/nginx.conf fi # Adding task to the vesta pipe diff --git a/bin/v_delete_web_domain_ssl b/bin/v_delete_web_domain_ssl index 84811928d..67f84d675 100755 --- a/bin/v_delete_web_domain_ssl +++ b/bin/v_delete_web_domain_ssl @@ -56,7 +56,7 @@ is_web_domain_value_exist '$SSL' # Parsing domain values get_web_domain_values -conf="$V_HOME/$user/conf/shttpd.conf" +conf="$V_HOME/$user/conf/web/shttpd.conf" tpl_file="$V_WEBTPL/apache_$TPL.stpl" # Deleting domain @@ -65,7 +65,7 @@ del_web_config # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config fi diff --git a/bin/v_restart_web b/bin/v_restart_web index d24cbcd97..34fea61b9 100755 --- a/bin/v_restart_web +++ b/bin/v_restart_web @@ -15,20 +15,36 @@ source $V_CONF/vesta.conf # Restart functions apache() { - /etc/init.d/httpd 'graceful' >/dev/null 2>&1 - if [ $? -ne 0 ]; then - #$V_FUNC/report_issue 'web' 'apache' - echo "$E_RESTART $1" - exit $E_RESTART + /etc/init.d/httpd status >/dev/null 2>&1 + if [ $? -eq 0 ]; then + /etc/init.d/httpd graceful >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$E_RESTART $1" + exit $E_RESTART + fi + else + /etc/init.d/httpd start >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$E_RESTART $1" + exit $E_RESTART + fi fi } nginx() { - /etc/init.d/nginx 'reload' >/dev/null 2>&1 - if [ $? -ne 0 ]; then - #$V_FUNC/report_issue 'web' 'nginx' - echo "$E_RESTART $1" - exit $E_RESTART + /etc/init.d/nginx status >/dev/null 2>&1 + if [ $? -eq 0 ]; then + /etc/init.d/nginx reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$E_RESTART $1" + exit $E_RESTART + fi + else + /etc/init.d/nginx start >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$E_RESTART $1" + exit $E_RESTART + fi fi } diff --git a/bin/v_suspend_web_domain b/bin/v_suspend_web_domain index 247e325b6..8ae1b9e02 100755 --- a/bin/v_suspend_web_domain +++ b/bin/v_suspend_web_domain @@ -56,7 +56,7 @@ is_domain_suspended 'web' # Parsing domain values get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" SUSPENDED='yes' # Preparing domain values for the template substitution @@ -69,7 +69,7 @@ add_web_config # Check ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi @@ -77,14 +77,14 @@ fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config add_web_config if [ "$SSL" = 'yes' ]; then proxy_string="rewrite ^(.*)\$ http://$url;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config add_web_config fi diff --git a/bin/v_unsuspend_web_domain b/bin/v_unsuspend_web_domain index 6dd951dc9..c7e9287bb 100755 --- a/bin/v_unsuspend_web_domain +++ b/bin/v_unsuspend_web_domain @@ -51,7 +51,7 @@ is_domain_unsuspended 'web' # Parsing domain values get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.tpl" -conf="$V_HOME/$user/conf/httpd.conf" +conf="$V_HOME/$user/conf/web/httpd.conf" SUSPENDED='no' # Preparing domain values for the template substitution @@ -64,7 +64,7 @@ add_web_config # Check ssl if [ "$SSL" = 'yes' ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" - conf="$V_HOME/$user/conf/shttpd.conf" + conf="$V_HOME/$user/conf/web/shttpd.conf" del_web_config add_web_config fi @@ -72,14 +72,14 @@ fi # Checking nginx if [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.tpl" - conf="$V_HOME/$user/conf/nginx.conf" + conf="$V_HOME/$user/conf/web/nginx.conf" del_web_config add_web_config if [ "$SSL" = 'yes' ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" - conf="$V_HOME/$user/conf/snginx.conf" + conf="$V_HOME/$user/conf/web/snginx.conf" del_web_config add_web_config fi