diff --git a/bin/v_delete_sys_ip b/bin/v_delete_sys_ip index 419a8970..02738f18 100755 --- a/bin/v_delete_sys_ip +++ b/bin/v_delete_sys_ip @@ -35,9 +35,6 @@ is_ip_key_empty '$U_WEB_DOMAINS' # Checking users on ip is_ip_key_empty '$U_SYS_USERS' -# We do not check ownership if -# no one actualy use this ip - # Checking interface interface=$(get_current_interface) diff --git a/data/templates/ngingx_ip.tpl b/data/templates/ngingx_ip.tpl index 96fcc845..37b73396 100644 --- a/data/templates/ngingx_ip.tpl +++ b/data/templates/ngingx_ip.tpl @@ -1,9 +1,7 @@ server { listen %ip%:%proxy_port% default; server_name _; - server_name_in_redirect off; - #access_log /var/log/nginx/%ip%.log main; - + #access_log /var/log/nginx/%ip%.log main; location / { proxy_pass http://%ip%:%web_port%; } diff --git a/data/templates/ngingx_vhost_default.stpl b/data/templates/ngingx_vhost_default.stpl index 22747040..f4696294 100644 --- a/data/templates/ngingx_vhost_default.stpl +++ b/data/templates/ngingx_vhost_default.stpl @@ -1,7 +1,6 @@ server { listen %ip%:%proxy_ssl_port%; server_name %domain_idn% %alias_idn%; - server_name_in_redirect off; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; diff --git a/data/templates/ngingx_vhost_default.tpl b/data/templates/ngingx_vhost_default.tpl index 2035c253..2646c311 100644 --- a/data/templates/ngingx_vhost_default.tpl +++ b/data/templates/ngingx_vhost_default.tpl @@ -1,7 +1,6 @@ server { listen %ip%:%proxy_port%; server_name %domain_idn% %alias_idn%; - server_name_in_redirect off; %elog%error_log /var/log/httpd/domains/%domain%.error.log error; location / { diff --git a/func/domain.func b/func/domain.func index 1f8c58d8..6dbe7aa7 100644 --- a/func/domain.func +++ b/func/domain.func @@ -600,33 +600,29 @@ dom_clear_list() { } namehost_ip_support() { - #Checking web system + # Checking httpd config for NameHost string number if [ "$WEB_SYSTEM" = 'apache' ]; then - - # Checking httpd config for NameHost string number conf_line=$(grep -n "NameVirtual" $conf|tail -n 1|cut -f 1 -d ':') if [ ! -z "$conf_line" ]; then - conf_ins=$((conf_line + 1)) # inster into next line + conf_ins=$((conf_line + 1)) else - conf_ins='1' # insert into first line + conf_ins='1' fi # Checking ssl support if [ "$WEB_SSL" = 'mod_ssl' ]; then - web_ssl_port=$(get_config_value '$WEB_SSL_PORT') - sed -i "$conf_ins i NameVirtualHost $ip:$web_ssl_port" $conf - sed -i "$conf_ins i Listen $ip:$web_ssl_port" $conf + sed -i "$conf_ins i NameVirtualHost $ip:$WEB_SSL_PORT" $conf + sed -i "$conf_ins i Listen $ip:$WEB_SSL_PORT" $conf fi - web_port=$(get_config_value '$WEB_PORT') - sed -i "$conf_ins i NameVirtualHost $ip:$web_port" $conf - sed -i "$conf_ins i Listen $ip:$web_port" $conf + sed -i "$conf_ins i NameVirtualHost $ip:$WEB_PORT" $conf + sed -i "$conf_ins i Listen $ip:$WEB_PORT" $conf # Checking proxy support if [ "$PROXY_SYSTEM" = 'nginx' ]; then - proxy_port=$(get_config_value '$PROXY_PORT') cat $V_WEBTPL/ngingx_ip.tpl | sed -e "s/%ip%/$ip/g" \ - -e "s/%web_port%/$web_port/g" -e "s/%proxy_port%/$proxy_port/g" >>$nconf + -e "s/%web_port%/$WEB_SSL_PORT/g" \ + -e "s/%proxy_port%/$PROXY_PORT/g" >>$nconf # Adding to rpaf ip pool as well ips=$(grep 'RPAFproxy_ips' $rconf) diff --git a/func/ip.func b/func/ip.func index 811b415c..55332d85 100644 --- a/func/ip.func +++ b/func/ip.func @@ -1,6 +1,6 @@ is_sys_ip_free() { # Parsing system ips - ip_list=$(ifconfig|grep 'inet addr:'|cut -f 2 -d ':'|cut -f 1 -d " ") + ip_list=$(/sbin/ifconfig|grep 'inet addr:'|cut -f 2 -d ':'|cut -f 1 -d " ") # Checking ip existance ip_check=$(echo "$ip_list"|grep -w "$ip") @@ -13,7 +13,7 @@ is_sys_ip_free() { get_next_interface_number() { # Parsing ifconfig - i=$(ifconfig -a |grep -w "$interface"|cut -f1 -d ' '|\ + i=$(/sbin/ifconfig -a |grep -w "$interface"|cut -f1 -d ' '|\ tail -n 1|cut -f 2 -d :) # Checking result