diff --git a/bin/v-change-sys-service-config b/bin/v-change-sys-service-config index 188faed..0ede52f 100755 --- a/bin/v-change-sys-service-config +++ b/bin/v-change-sys-service-config @@ -136,7 +136,7 @@ if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then fi fi - $BIN/v-restart-service "$service" > /dev/null 2>&1 + $BIN/v-restart-service "$service" > /dev/null 2>&1 if [ $? -ne 0 ]; then for config in $dst; do diff --git a/bin/v-stop-service b/bin/v-stop-service index 558fb0b..78328f0 100755 --- a/bin/v-stop-service +++ b/bin/v-stop-service @@ -47,7 +47,11 @@ for service in $service_list; do if [ "$service" = "iptables" ]; then $BIN/v-stop-firewall else - systemctl stop "$service" + if [ "$service" = "nginx" ]; then + systemctl stop nginx-system + else + systemctl stop "$service" + fi result=$? if [ "$result" -ne 0 ]; then $BIN/v-log-action "system" "Error" "System" "Service failed to stop (Name: $service)." diff --git a/install/hst-install.sh b/install/hst-install.sh index ed257ff..14468e9 100755 --- a/install/hst-install.sh +++ b/install/hst-install.sh @@ -559,6 +559,9 @@ clear install_welcome_message # Web stack +if [ "$bunkerweb" = 'yes' ]; then + echo ' - Bunkerweb protection' +fi echo ' - NGINX Web / Proxy Server' if [ "$apache" = 'yes' ]; then echo ' - Apache Web Server (as backend)' @@ -1412,6 +1415,10 @@ mkdir -p /usr/local/hestia/nginx-system/etc/nginx/modules-enabled mkdir -p /var/log/nginx/domains mkdir -p /usr/local/hestia/nginx-system/etc/nginx/conf.d/main +PROXY_PORT=$(grep '^PROXY_PORT=' "$HESTIA/conf/hestia.conf" | cut -d'=' -f2 | tr -d "'" || echo 80) +NGINX_CONF="/usr/local/hestia/nginx-system/etc/nginx/conf.d/default.conf" +sed -i "s/^\(\s*listen\s*\)['\"]*[0-9]\+['\"]*;/\1${PROXY_PORT};/" "$NGINX_CONF" + # Update dns servers in nginx.conf for nameserver in $(grep -is '^nameserver' /etc/resolv.conf | cut -d' ' -f2 | tr '\r\n' ' ' | xargs); do if [[ "$nameserver" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then