6 Commits

Author SHA1 Message Date
Alexey Berezhok
4cb55905cc Try to support bunkerweb 2026-04-11 00:41:04 +03:00
Alexey Berezhok
d76624ff43 Fixed updater 2026-03-29 22:41:21 +03:00
alexey
27b237a3c7 Added support ansible instead of puppet 2026-03-29 12:21:10 +03:00
alexey
5349d46d71 Fixed resore proxy_fcgi 2026-03-29 11:07:01 +03:00
alexey
75df7a2554 Fixes for php remi 2026-03-28 20:16:08 +03:00
alexey
479a65e0dd Added remi php install fixes 2026-03-28 18:55:38 +03:00
171 changed files with 513 additions and 321 deletions

View File

@@ -79,9 +79,9 @@ EOF
chown root:$user $fastcgi chown root:$user $fastcgi
chmod 640 $fastcgi chmod 640 $fastcgi
str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2" str="fastcgi_cache_path /usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain levels=1:2"
str="$str keys_zone=$domain:10m max_size=512m inactive=30m use_temp_path=off;" str="$str keys_zone=$domain:10m max_size=512m inactive=30m use_temp_path=off;"
conf='/etc/nginx/conf.d/fastcgi_cache_pool.conf' conf='/usr/local/hestia/nginx-system/etc/nginx/conf.d/fastcgi_cache_pool.conf'
if [ -f "$conf" ]; then if [ -f "$conf" ]; then
if [ -z "$(grep "=${domain}:" $conf)" ]; then if [ -z "$(grep "=${domain}:" $conf)" ]; then
echo "$str" >> $conf echo "$str" >> $conf
@@ -90,7 +90,7 @@ else
echo "$str" >> $conf echo "$str" >> $conf
fi fi
mkdir -p /var/cache/nginx/micro/$domain mkdir -p /usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain
#----------------------------------------------------------# #----------------------------------------------------------#
# Hestia # # Hestia #

View File

@@ -156,8 +156,7 @@ else
fi fi
# Check if required modules for apache2 are enabled # Check if required modules for apache2 are enabled
if [ "$WEB_SYSTEM" = "apache2" ]; then if [ "$WEB_SYSTEM" = "httpd" ]; then
if [ -f /etc/redhat-release ]; then
if ! httpd -M | grep 'proxy_fcgi_module' ; then if ! httpd -M | grep 'proxy_fcgi_module' ; then
sed 's/#LoadModule proxy_fcgi_module/LoadModule proxy_fcgi_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf sed 's/#LoadModule proxy_fcgi_module/LoadModule proxy_fcgi_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf
sed 's/#LoadModule proxy_module/LoadModule proxy_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf sed 's/#LoadModule proxy_module/LoadModule proxy_module/' -i /etc/httpd/conf.modules.d/00-proxy.conf
@@ -165,14 +164,7 @@ if [ "$WEB_SYSTEM" = "apache2" ]; then
if ! httpd -M | grep 'setenvif_module' ; then if ! httpd -M | grep 'setenvif_module' ; then
sed 's/#LoadModule setenvif_module/LoadModule setenvif_module/' -i /etc/httpd/conf.modules.d/00-base.conf sed 's/#LoadModule setenvif_module/LoadModule setenvif_module/' -i /etc/httpd/conf.modules.d/00-base.conf
fi fi
else
if ! a2query -q -m proxy_fcgi; then
a2enmod -q proxy_fcgi
fi
if ! a2query -q -m setenvif; then
a2enmod -q setenvif
fi
fi
$BIN/v-restart-web "yes" $BIN/v-restart-web "yes"
fi fi

View File

@@ -68,13 +68,13 @@ if [ "$type" = "pma" ] || [ "$type" = "PMA" ] || [ "$type" = "phpmyadmin" ]; the
$BIN/v-restart-service httpd $BIN/v-restart-service httpd
fi fi
if [ -e "/etc/nginx/conf.d/phpmyadmin.inc" ]; then if [ -e "/usr/local/hestia/nginx-system/etc/nginx/conf.d/phpmyadmin.inc" ]; then
rm -f /etc/nginx/conf.d/phpmyadmin.inc rm -f /usr/local/hestia/nginx-system/etc/nginx/conf.d/phpmyadmin.inc
cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.inc cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /usr/local/hestia/nginx-system/etc/nginx/conf.d/phpmyadmin.inc
sed -i "s|%pma_alias%|$alias|g" /etc/nginx/conf.d/phpmyadmin.inc sed -i "s|%pma_alias%|$alias|g" /usr/local/hestia/nginx-system/etc/nginx/conf.d/phpmyadmin.inc
# Restart services # Restart services
$BIN/v-restart-service nginx $BIN/v-restart-service nginx-system
fi fi
fi fi
@@ -105,13 +105,13 @@ if [ "$type" = "pga" ] || [ "$type" = "PGA" ] || [ "$type" = "phppgadmin" ]; the
$BIN/v-restart-service httpd $BIN/v-restart-service httpd
fi fi
if [ -e "/etc/nginx/conf.d/phppgadmin.inc" ]; then if [ -e "/usr/local/hestia/nginx-system/etc/nginx/conf.d/phppgadmin.inc" ]; then
rm -f /etc/nginx/conf.d/phppgadmin.inc rm -f /usr/local/hestia/nginx-system/etc/nginx/conf.d/phppgadmin.inc
cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /etc/nginx/conf.d/phppgadmin.inc cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /usr/local/hestia/nginx-system/etc/nginx/conf.d/phppgadmin.inc
sed -i "s|%pga_alias%|$alias|g" /etc/nginx/conf.d/phppgadmin.inc sed -i "s|%pga_alias%|$alias|g" /usr/local/hestia/nginx-system/etc/nginx/conf.d/phppgadmin.inc
# Restart services # Restart services
$BIN/v-restart-service nginx $BIN/v-restart-service nginx-system
fi fi
fi fi

View File

@@ -65,7 +65,7 @@ fi
# Defining dst config path # Defining dst config path
case $service in case $service in
nginx) dst='/etc/nginx/nginx.conf' ;; nginx) dst='/usr/local/hestia/nginx-system/etc/nginx/nginx.conf' ;;
httpd) dst='/etc/httpd/conf/httpd.conf' ;; httpd) dst='/etc/httpd/conf/httpd.conf' ;;
apache2) dst='/etc/apache2/apache2.conf' ;; apache2) dst='/etc/apache2/apache2.conf' ;;
exim) dst='/etc/exim/exim.conf' ;; exim) dst='/etc/exim/exim.conf' ;;

View File

@@ -31,7 +31,7 @@ SERVICE_NAME="$1"
case "$SERVICE_NAME" in case "$SERVICE_NAME" in
nginx ) nginx )
/usr/sbin/nginx -t >> "$DEBUG_LOG_FILE" 2>&1 /usr/local/hestia/nginx-system/sbin/nginx -t >> "$DEBUG_LOG_FILE" 2>&1
V_RESULT=$? V_RESULT=$?
exit $V_RESULT exit $V_RESULT
;; ;;
@@ -47,5 +47,3 @@ esac
# Something like error, we shouldn't be here # Something like error, we shouldn't be here
exit 1 exit 1

View File

@@ -49,7 +49,7 @@ if [ -f "$HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.fastcgi_cache.conf" ]; then
rm -rf $HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.fastcgi_cache.conf rm -rf $HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.fastcgi_cache.conf
fi fi
conf='/etc/nginx/conf.d/fastcgi_cache_pool.conf' conf='/usr/local/hestia/nginx-system/etc/nginx/conf.d/fastcgi_cache_pool.conf'
if [ -f "$conf" ]; then if [ -f "$conf" ]; then
sed -i "/ keys_zone=$domain/d" $conf sed -i "/ keys_zone=$domain/d" $conf
if [ ! -s "$conf" ]; then if [ ! -s "$conf" ]; then
@@ -58,7 +58,7 @@ if [ -f "$conf" ]; then
fi fi
# Delete FastCGI cache folder # Delete FastCGI cache folder
if [ -d "/var/cache/nginx/micro/$domain" ]; then if [ -d "/usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain" ]; then
rm -rf /var/cache/nginx/micro/$domain rm -rf /var/cache/nginx/micro/$domain
fi fi

View File

@@ -65,7 +65,7 @@ csv_list() {
#----------------------------------------------------------# #----------------------------------------------------------#
# Defining config path # Defining config path
config_path='/etc/nginx/nginx.conf' config_path='/usr/local/hestia/nginx-system/etc/nginx/nginx.conf'
# Defining keys # Defining keys
keys="worker_processes |worker_connections |send_timeout" keys="worker_processes |worker_connections |send_timeout"

View File

@@ -48,13 +48,13 @@ conf=$(grep "DOMAIN='$domain'" "$USER_DATA/web.conf")
parse_object_kv_list "$conf" parse_object_kv_list "$conf"
# Purge nginx FastCGI cache # Purge nginx FastCGI cache
if [ -d "/var/cache/nginx/micro/$domain" ]; then if [ -d "/usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain" ]; then
rm -rf /var/cache/nginx/micro/$domain/* rm -rf /usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain/*
fi fi
# Purge nginx proxy cache # Purge nginx proxy cache
if [ -d "/var/cache/nginx/$domain" ]; then if [ -d "/usr/local/hestia/nginx-system/var/cache/nginx/$domain" ]; then
rm -rf /var/cache/nginx/$domain/* rm -rf /usr/local/hestia/nginx-system/var/cache/nginx/$domain/*
fi fi
#----------------------------------------------------------# #----------------------------------------------------------#

View File

@@ -25,11 +25,15 @@ send_email_report() {
email=$(echo "$email" | cut -f 2 -d "'") email=$(echo "$email" | cut -f 2 -d "'")
tmpfile=$(mktemp) tmpfile=$(mktemp)
subj="$(hostname): $PROXY_SYSTEM restart failed" subj="$(hostname): $PROXY_SYSTEM restart failed"
nginx -t >> $tmpfile 2>&1 /usr/local/hestia/nginx-system/sbin/nginx -t >> $tmpfile 2>&1
if [ "$1" == "DO_RESTART" ]; then if [ "$1" == "DO_RESTART" ]; then
if [ "$PROXY_SYSTEM" = "nginx" ]; then
service nginx-system restart >> $tmpfile 2>&1
else
service "$PROXY_SYSTEM" restart >> $tmpfile 2>&1 service "$PROXY_SYSTEM" restart >> $tmpfile 2>&1
fi fi
fi
cat "$tmpfile" | $SENDMAIL -s "$subj" "$email" cat "$tmpfile" | $SENDMAIL -s "$subj" "$email"
if [ "$DEBUG_MODE" = "true" ]; then if [ "$DEBUG_MODE" = "true" ]; then
echo "[ $date | $PROXY_SYSTEM | PROXY ]" >> /var/log/hestia/debug.log 2>&1 echo "[ $date | $PROXY_SYSTEM | PROXY ]" >> /var/log/hestia/debug.log 2>&1

View File

@@ -73,7 +73,7 @@ for service in $service_list; do
$BIN/v-stop-firewall $BIN/v-stop-firewall
$BIN/v-update-firewall $BIN/v-update-firewall
elif [ "$restart" = "ssl" ] && [ "$service" = "nginx" ]; then elif [ "$restart" = "ssl" ] && [ "$service" = "nginx" ]; then
service $service upgrade >> $log 2>&1 service nginx-system upgrade >> $log 2>&1
elif [ -z "$restart" -o "$restart" = "no" ] && [ \ elif [ -z "$restart" -o "$restart" = "no" ] && [ \
"$service" = "nginx" -o \ "$service" = "nginx" -o \
"$service" = "httpd" -o \ "$service" = "httpd" -o \
@@ -86,11 +86,20 @@ for service in $service_list; do
"$service" = "proftpd" -o \ "$service" = "proftpd" -o \
"$service" = "ssh" -o \ "$service" = "ssh" -o \
"$service" = "fail2ban" ]; then "$service" = "fail2ban" ]; then
if [ "$service" = "nginx" ]; then
systemctl reload-or-restart nginx-system >> $log 2>&1
else
systemctl reload-or-restart "$service" >> $log 2>&1 systemctl reload-or-restart "$service" >> $log 2>&1
fi
else
if [ "$service" = "nginx" ]; then
systemctl reset-failed nginx-system >> $log 2>&1
systemctl restart nginx-system >> $log 2>&1
else else
systemctl reset-failed "$service" >> $log 2>&1 systemctl reset-failed "$service" >> $log 2>&1
systemctl restart "$service" >> $log 2>&1 systemctl restart "$service" >> $log 2>&1
fi fi
fi
# Check the result of the service restart and report whether it failed. # Check the result of the service restart and report whether it failed.
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then

View File

@@ -86,7 +86,11 @@ if [ -n "$old_ip" ]; then
# Updating PROXY # Updating PROXY
if [ -n "$PROXY_SYSTEM" ]; then if [ -n "$PROXY_SYSTEM" ]; then
if [ "$PROXY_SYSTEM" = "nginx" ]; then
cd /usr/local/hestia/nginx-system/etc/nginx/$pconfd
else
cd /etc/$PROXY_SYSTEM/$pconfd cd /etc/$PROXY_SYSTEM/$pconfd
fi
if [ -e "$old_ip.conf" ]; then if [ -e "$old_ip.conf" ]; then
mv $old_ip.conf $new_ip.conf mv $old_ip.conf $new_ip.conf
sed -i "s/$old_ip/$new_ip/g" $new_ip.conf sed -i "s/$old_ip/$new_ip/g" $new_ip.conf
@@ -95,7 +99,11 @@ if [ -n "$old_ip" ]; then
# Updating WEB # Updating WEB
if [ -n "$WEB_SYSTEM" ]; then if [ -n "$WEB_SYSTEM" ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
cd /usr/local/hestia/nginx-system/etc/nginx/$confd
else
cd /etc/$WEB_SYSTEM/$confd cd /etc/$WEB_SYSTEM/$confd
fi
if [ -e "$old_ip.conf" ]; then if [ -e "$old_ip.conf" ]; then
mv $old_ip.conf $new_ip.conf mv $old_ip.conf $new_ip.conf
@@ -161,8 +169,8 @@ for ip in $ips; do
prefixlen="$(ip -d -j addr show | jq --arg IP "$ip" -r '.[].addr_info[] | if .local == $IP then .prefixlen else empty end')" prefixlen="$(ip -d -j addr show | jq --arg IP "$ip" -r '.[].addr_info[] | if .local == $IP then .prefixlen else empty end')"
netmask="$(convert_cidr "$prefixlen")" netmask="$(convert_cidr "$prefixlen")"
$BIN/v-add-sys-ip "$ip" "$netmask" "$interface" $BIN/v-add-sys-ip "$ip" "$netmask" "$interface"
elif [ -e "/etc/nginx/conf.d/$ip.conf" ]; then elif [ -e "/usr/local/hestia/nginx-system/etc/nginx/conf.d/$ip.conf" ]; then
process_http2_directive "/etc/nginx/conf.d/$ip.conf" process_http2_directive "/usr/local/hestia/nginx-system/etc/nginx/conf.d/$ip.conf"
fi fi
done done

View File

@@ -112,11 +112,11 @@ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
try_files $uri =404; try_files $uri =404;
fastcgi_pass %backend_lsnr%; fastcgi_pass %backend_lsnr%;
fastcgi_index index.php; fastcgi_index index.php;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
} }
``` ```
Добавьте следующие строки под `include /etc/nginx/fastcgi_params;`: Добавьте следующие строки под `include /usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;`:
```bash ```bash
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*; include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;

View File

@@ -383,7 +383,11 @@ add_web_config() {
if [[ "$TPLNM" =~ stpl$ ]]; then if [[ "$TPLNM" =~ stpl$ ]]; then
rm -f /etc/$1/$confd/domains/$domain.ssl.conf rm -f /etc/$1/$confd/domains/$domain.ssl.conf
if [ "$1" = "nginx" ]; then
ln -s $conf /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$domain.ssl.conf
else
ln -s $conf /etc/$1/$confd/domains/$domain.ssl.conf ln -s $conf /etc/$1/$confd/domains/$domain.ssl.conf
fi
# Rename/Move extra SSL config files # Rename/Move extra SSL config files
find=$(find $HOMEDIR/$user/conf/web/*.$domain.org* 2> /dev/null) find=$(find $HOMEDIR/$user/conf/web/*.$domain.org* 2> /dev/null)
@@ -398,9 +402,14 @@ add_web_config() {
mv "$f" "$HOMEDIR/$user/conf/web/$domain/$ServerType.ssl.conf_old$CustomConfigName" mv "$f" "$HOMEDIR/$user/conf/web/$domain/$ServerType.ssl.conf_old$CustomConfigName"
fi fi
done done
else
if [ "$1" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$domain.conf
ln -s $conf /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$domain.conf
else else
rm -f /etc/$1/$confd/domains/$domain.conf rm -f /etc/$1/$confd/domains/$domain.conf
ln -s $conf /etc/$1/$confd/domains/$domain.conf ln -s $conf /etc/$1/$confd/domains/$domain.conf
fi
# Rename/Move extra config files # Rename/Move extra config files
find=$(find $HOMEDIR/$user/conf/web/*.$domain.org* 2> /dev/null) find=$(find $HOMEDIR/$user/conf/web/*.$domain.org* 2> /dev/null)
for f in $find; do for f in $find; do
@@ -425,14 +434,18 @@ add_web_config() {
MOD_CONF="/etc/httpd/conf.modules.d/09-mod-php.conf" MOD_CONF="/etc/httpd/conf.modules.d/09-mod-php.conf"
PHP_DEFAULT="/usr/bin/php-cgi" PHP_DEFAULT="/usr/bin/php-cgi"
if [ -e $MOD_CONF ]; then
php_ver=$(grep -m1 '^LoadModule php_module ' "$MOD_CONF" | grep -oP 'php\d{2}') php_ver=$(grep -m1 '^LoadModule php_module ' "$MOD_CONF" | grep -oP 'php\d{2}')
else
php_ver=$(find /etc/httpd/conf.modules.d -maxdepth 1 -type f -name '*-php*-php.conf' -print -quit | sed -n 's/.*-\(php[0-9]\+\)-php\.conf$/\1/p')
fi
php_cgi_path=$PHP_DEFAULT php_cgi_path=$PHP_DEFAULT
if [ -n "$php_ver" ]; then if [ -n "$php_ver" ]; then
if [ -n "$php_type" ]; then if [ -n "$php_type" ]; then
php_cgi_path="/opt/brepo/${php_ver}/bin/php-cgi" php_cgi_path="/opt/brepo/${php_ver}/bin/php-cgi"
else else
php_cgi_path="/etc/opt/remi/php${php_ver}/bin/php-cgi" php_cgi_path="/opt/remi/${php_ver}/root/bin/php-cgi"
fi fi
fi fi
@@ -514,18 +527,30 @@ del_web_config() {
rm -f $legacyconf rm -f $legacyconf
# Remove old global includes file # Remove old global includes file
if [ "$1" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/hestia.conf
else
rm -f /etc/$1/$confd/hestia.conf rm -f /etc/$1/$confd/hestia.conf
fi fi
fi
# Remove domain configuration files and clean up symbolic links # Remove domain configuration files and clean up symbolic links
rm -f "$conf" rm -f "$conf"
if [ -n "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" = "$1" ]; then if [ -n "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" = "$1" ]; then
if [ "$WEB_SYSTEM" = "nginx" ]; then
rm -f "/usr/local/hestia/nginx-system/etc/$WEB_SYSTEM/$confd/domains/$confname"
else
rm -f "/etc/$WEB_SYSTEM/$confd/domains/$confname" rm -f "/etc/$WEB_SYSTEM/$confd/domains/$confname"
fi fi
fi
if [ -n "$PROXY_SYSTEM" ] && [ "$PROXY_SYSTEM" = "$1" ]; then if [ -n "$PROXY_SYSTEM" ] && [ "$PROXY_SYSTEM" = "$1" ]; then
if [ "$PROXY_SYSTEM" = "nginx" ]; then
rm -f "/usr/local/hestia/nginx-system/etc/$PROXY_SYSTEM/$confd/domains/$confname"
else
rm -f "/etc/$PROXY_SYSTEM/$confd/domains/$confname" rm -f "/etc/$PROXY_SYSTEM/$confd/domains/$confname"
fi fi
fi
} }
# SSL certificate verification # SSL certificate verification
@@ -913,8 +938,16 @@ del_mail_ssl_config() {
# Remove SSL vhost configuration # Remove SSL vhost configuration
rm -f $HOMEDIR/$user/conf/mail/$domain/*.*ssl.conf rm -f $HOMEDIR/$user/conf/mail/$domain/*.*ssl.conf
if [ "$WEB_SYSTEM" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
else
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
fi
if [ "$PROXY_SYSTEM" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
else
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
fi
# Remove SSL certificates # Remove SSL certificates
rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/* rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/*
@@ -1002,14 +1035,24 @@ add_webmail_config() {
if [[ "$2" =~ stpl$ ]]; then if [[ "$2" =~ stpl$ ]]; then
if [ -n "$WEB_SYSTEM" ]; then if [ -n "$WEB_SYSTEM" ]; then
forcessl="$HOMEDIR/$user/conf/mail/$domain/$WEB_SYSTEM.forcessl.conf" forcessl="$HOMEDIR/$user/conf/mail/$domain/$WEB_SYSTEM.forcessl.conf"
if [ "$1" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
ln -s $conf /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
else
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
fi fi
fi
if [ -n "$PROXY_SYSTEM" ]; then if [ -n "$PROXY_SYSTEM" ]; then
forcessl="$HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.forcessl.conf" forcessl="$HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.forcessl.conf"
if [ "$1" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
ln -s $conf /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
else
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
fi fi
fi
# Add rewrite rules to force HTTPS/SSL connections # Add rewrite rules to force HTTPS/SSL connections
if [ -n "$PROXY_SYSTEM" ] || [ "$WEB_SYSTEM" = 'nginx' ]; then if [ -n "$PROXY_SYSTEM" ] || [ "$WEB_SYSTEM" = 'nginx' ]; then
@@ -1023,13 +1066,23 @@ add_webmail_config() {
find $HOMEDIR/$user/conf/mail/ -maxdepth 1 -type f \( -name "$domain.*" -o -name "ssl.$domain.*" -o -name "*nginx.$domain.*" \) -exec rm {} \; find $HOMEDIR/$user/conf/mail/ -maxdepth 1 -type f \( -name "$domain.*" -o -name "ssl.$domain.*" -o -name "*nginx.$domain.*" \) -exec rm {} \;
else else
if [ -n "$WEB_SYSTEM" ]; then if [ -n "$WEB_SYSTEM" ]; then
if [ "$1" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
ln -s $conf /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
else
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
fi fi
fi
if [ -n "$PROXY_SYSTEM" ]; then if [ -n "$PROXY_SYSTEM" ]; then
if [ "$1" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
ln -s $conf /usr/local/hestia/nginx-system/etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
else
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
fi fi
fi
# Clear old configurations # Clear old configurations
find $HOMEDIR/$user/conf/mail/ -maxdepth 1 -type f \( -name "$domain.*" \) -exec rm {} \; find $HOMEDIR/$user/conf/mail/ -maxdepth 1 -type f \( -name "$domain.*" \) -exec rm {} \;
fi fi
@@ -1049,13 +1102,21 @@ del_webmail_config() {
fi fi
if [ -n "$WEB_SYSTEM" ]; then if [ -n "$WEB_SYSTEM" ]; then
rm -f $HOMEDIR/$user/$confd/mail/$domain/$WEB_SYSTEM.conf rm -f $HOMEDIR/$user/$confd/mail/$domain/$WEB_SYSTEM.conf
if [ "$WEB_SYSTEM" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
else
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.conf rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
fi fi
fi
if [ -n "$PROXY_SYSTEM" ]; then if [ -n "$PROXY_SYSTEM" ]; then
rm -f $HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.*conf rm -f $HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.*conf
if [ "$PROXY_SYSTEM" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.conf
else
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.conf rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.conf
fi fi
fi
} }
# Delete SSL webmail support # Delete SSL webmail support
@@ -1072,13 +1133,21 @@ del_webmail_ssl_config() {
fi fi
if [ -n "$WEB_SYSTEM" ]; then if [ -n "$WEB_SYSTEM" ]; then
rm -f $HOMEDIR/$user/conf/mail/$domain/$WEB_SYSTEM.*ssl.conf rm -f $HOMEDIR/$user/conf/mail/$domain/$WEB_SYSTEM.*ssl.conf
if [ "$WEB_SYSTEM" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
else
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
fi fi
fi
if [ -n "$PROXY_SYSTEM" ]; then if [ -n "$PROXY_SYSTEM" ]; then
rm -f $HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.*ssl.conf rm -f $HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.*ssl.conf
if [ "$PROXY_SYSTEM" = "nginx" ]; then
rm -f /usr/local/hestia/nginx-system/etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
else
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
fi fi
fi
} }
#----------------------------------------------------------# #----------------------------------------------------------#
@@ -1183,14 +1252,14 @@ is_base_domain_owner() {
#----------------------------------------------------------# #----------------------------------------------------------#
process_http2_directive() { process_http2_directive() {
if [ -e /etc/nginx/conf.d/http2-directive.conf ]; then if [ -e /usr/local/hestia/nginx-system/etc/nginx/conf.d/http2-directive.conf ]; then
while IFS= read -r old_param; do while IFS= read -r old_param; do
new_param="$(echo "$old_param" | sed 's/\shttp2//')" new_param="$(echo "$old_param" | sed 's/\shttp2//')"
sed -i "s/$old_param/$new_param/" "$1" sed -i "s/$old_param/$new_param/" "$1"
done < <(grep -E "listen.*(\bssl\b(\s|.+){1,}\bhttp2\b|\bhttp2\b(\s|.+){1,}\bssl\b).*;" "$1") done < <(grep -E "listen.*(\bssl\b(\s|.+){1,}\bhttp2\b|\bhttp2\b(\s|.+){1,}\bssl\b).*;" "$1")
else else
if version_ge "$(nginx -v 2>&1 | cut -d'/' -f2)" "1.25.1"; then if version_ge "$(/usr/local/hestia/nginx-system/sbin/nginx -v 2>&1 | cut -d'/' -f2)" "1.25.1"; then
echo "http2 on;" > /etc/nginx/conf.d/http2-directive.conf echo "http2 on;" > /usr/local/hestia/nginx-system/etc/nginx/conf.d/http2-directive.conf
while IFS= read -r old_param; do while IFS= read -r old_param; do
new_param="$(echo "$old_param" | sed 's/\shttp2//')" new_param="$(echo "$old_param" | sed 's/\shttp2//')"

View File

@@ -57,10 +57,11 @@ upgrade_health_check() {
upgrade_welcome_message() { upgrade_welcome_message() {
echo echo
echo ' _ _ _ _ ____ ____ ' echo ' _ _ _ _ ____ ____ '
echo ' | | | | ___ ___| |_(_) __ _ / ___| _ \ ' echo ' | | | | ___ ___| |_(_) __ _ / ___| _ \ _ _ . . '
echo ' | |_| |/ _ \/ __| __| |/ _` | | | |_) | ' echo ' | |_| |/ _ \/ __| __| |/ _` | | | |_) | | \| \|\/| '
echo ' | _ | __/\__ \ |_| | (_| | |___| __/ ' echo ' | _ | __/\__ \ |_| | (_| | |___| __/ |_/|_/| | '
echo ' |_| |_|\___||___/\__|_|\__,_|\____|_| ' echo ' |_| |_|\___||___/\__|_|\__,_|\____|_| | \| | | '
echo " "
echo " " echo " "
echo " Hestia Control Panel Software Update " echo " Hestia Control Panel Software Update "
echo " Version: ${DISPLAY_VER}" echo " Version: ${DISPLAY_VER}"
@@ -535,7 +536,7 @@ upgrade_cloudflare_ip() {
cf_ips="$(curl -fsLm5 --retry 2 https://api.cloudflare.com/client/v4/ips)" cf_ips="$(curl -fsLm5 --retry 2 https://api.cloudflare.com/client/v4/ips)"
if [ -n "$cf_ips" ] && [ "$(echo "$cf_ips" | jq -r '.success//""')" = "true" ]; then if [ -n "$cf_ips" ] && [ "$(echo "$cf_ips" | jq -r '.success//""')" = "true" ]; then
cf_inc="/etc/nginx/conf.d/cloudflare.inc" cf_inc="/usr/local/hestia/nginx-system/etc/nginx/conf.d/cloudflare.inc"
echo "[ * ] Updating Cloudflare IP Ranges for NGINX..." echo "[ * ] Updating Cloudflare IP Ranges for NGINX..."
echo "# Cloudflare IP Ranges" > $cf_inc echo "# Cloudflare IP Ranges" > $cf_inc

View File

@@ -20,15 +20,15 @@ class PassengerWorker < Kernel::ModuleCoreWorker
ID: 2, ID: 2,
NAME: MODULE_ID, NAME: MODULE_ID,
DESCR: "Added passenger support for nginx", DESCR: "Added passenger support for nginx",
REQ: "puppet_installer", REQ: "",
CONF: "yes", CONF: "yes",
} }
end end
def enable def enable
log_file = get_log log_file = get_log
f_inst_pp = get_module_paydata("passenger_installer.pp") f_inst_pp = get_module_paydata("passenger_installer.yml")
f_uninst_pp = get_module_paydata("passenger_uninstaller.pp") f_uninst_pp = get_module_paydata("passenger_uninstaller.yml")
if !check if !check
inf = info inf = info
log("Req error, needed #{inf[:REQ]}") log("Req error, needed #{inf[:REQ]}")
@@ -36,16 +36,16 @@ class PassengerWorker < Kernel::ModuleCoreWorker
else else
begin begin
prepare_default_ruby_conf prepare_default_ruby_conf
log("install packages for passenger + nginx support: /usr/bin/puppet apply --detailed-exitcodes #{f_inst_pp}") log("install packages for passenger + nginx support: /usr/bin/ansible-playbook -vv #{f_inst_pp}")
result_action = `/usr/bin/puppet apply --detailed-exitcodes "#{f_inst_pp}" 2>&1` result_action = `LC_ALL=C.UTF-8 /usr/bin/ansible-playbook -vv "#{f_inst_pp}" 2>&1`
ex_status = $?.exitstatus ex_status = $?.exitstatus
if ex_status.to_i == 0 || ex_status.to_i == 2 if ex_status.to_i == 0 || ex_status.to_i == 2
log(result_action) log(result_action)
super super
else else
log(result_action) log(result_action)
log("Try to disable action: /usr/bin/puppet apply --detailed-exitcodes #{f_uninst_pp}") log("Try to disable action: /usr/bin/ansible-playbook -vv #{f_uninst_pp}")
result_action = `/usr/bin/puppet apply --detailed-exitcodes "#{f_uninst_pp}" 2>&1` result_action = `LC_ALL=C.UTF-8 /usr/bin/ansible-playbook -vv "#{f_uninst_pp}" 2>&1`
"module installation error. See log #{log_file}" "module installation error. See log #{log_file}"
end end
rescue => e rescue => e
@@ -57,14 +57,14 @@ class PassengerWorker < Kernel::ModuleCoreWorker
def disable def disable
log_file = get_log log_file = get_log
f_uninst_pp = get_module_paydata("passenger_uninstaller.pp") f_uninst_pp = get_module_paydata("passenger_uninstaller.yml")
if !check_domains_with_passenger if !check_domains_with_passenger
return log_return("Presents domains with passenger support disable it first") return log_return("Presents domains with passenger support disable it first")
end end
begin begin
log("uninstall packages for passenger + nginx support") log("uninstall packages for passenger + nginx support")
log("Try to disable action: /usr/bin/puppet apply --detailed-exitcodes #{f_uninst_pp}") log("Try to disable action: /usr/bin/ansible-playbook -vv #{f_uninst_pp}")
result_action = `/usr/bin/puppet apply --detailed-exitcodes "#{f_uninst_pp}" 2>&1` result_action = `LC_ALL=C.UTF-8 /usr/bin/ansible-playbook -vv "#{f_uninst_pp}" 2>&1`
ex_status = $?.exitstatus ex_status = $?.exitstatus
if ex_status.to_i == 0 || ex_status.to_i == 2 if ex_status.to_i == 0 || ex_status.to_i == 2
log(result_action) log(result_action)

View File

@@ -0,0 +1,69 @@
---
- name: Install Passenger and configure Nginx on localhost
hosts: localhost
connection: local
become: true
gather_facts: false
environment:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
tasks:
# Устанавливаем Ruby и зависимости
- name: Install rubygems-devel
ansible.builtin.dnf:
name: rubygems-devel
state: present
- name: Install rubygem-rake
ansible.builtin.dnf:
name: rubygem-rake
state: present
- name: Install ruby-devel
ansible.builtin.dnf:
name: ruby-devel
state: present
- name: Install rubygem-rack
ansible.builtin.dnf:
name: rubygem-rack
state: present
- name: Install alt-brepo-ruby33-devel
ansible.builtin.dnf:
name: alt-brepo-ruby33-devel
state: present
- name: Install alt-brepo-ruby33-rubygem-rake
ansible.builtin.dnf:
name: alt-brepo-ruby33-rubygem-rake
state: present
# Устанавливаем Passenger и модуль Nginx
- name: Install passenger-devel
ansible.builtin.dnf:
name: passenger-devel
state: present
- name: Install passenger
ansible.builtin.dnf:
name: passenger
state: present
- name: Install nginx-mod-http-passenger
ansible.builtin.dnf:
name: nginx-mod-http-passenger
state: present
# Конфигурируем Nginx для Passenger
- name: Create passenger.conf
ansible.builtin.copy:
dest: /etc/nginx/conf.d/passenger.conf
content: |
passenger_root /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby;
passenger_instance_registry_dir /var/run/passenger-instreg;
passenger_user_switching on;
passenger_env_var PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0;
passenger_env_var PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0;
- name: Create passenger_includer.conf
ansible.builtin.copy:
dest: /etc/nginx/conf.d/main/passenger.conf
content: |
load_module modules/ngx_http_passenger_module.so;
# Перезапускаем Nginx
- name: Restart nginx service
ansible.builtin.service:
name: nginx
state: restarted

View File

@@ -0,0 +1,38 @@
---
- name: Uninstall Passenger and configure Nginx on localhost
hosts: localhost
connection: local
become: true
gather_facts: false
environment:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
tasks:
# Удалаем модуль nginx-passenger
- name: Remove nginx-mod-http-passenger package
ansible.builtin.dnf:
name: nginx-mod-http-passenger
state: absent
# Удалаем passenger и зависимости
- name: Remove passenger-devel package
ansible.builtin.dnf:
name: passenger-devel
state: absent
- name: Remove passenger package
ansible.builtin.dnf:
name: passenger
state: absent
# Удаляем конфигурационные файлы Nginx
- name: Remove passenger.conf
ansible.builtin.file:
path: /etc/nginx/conf.d/passenger.conf
state: absent
- name: Remove passenger_includer.conf
ansible.builtin.file:
path: /etc/nginx/conf.d/main/passenger.conf
state: absent
# Перезапускаем Nginx (необязательно, но полезно)
- name: Restart nginx service
ansible.builtin.service:
name: nginx
state: restarted

View File

View File

@@ -13,7 +13,7 @@ location /%pma_alias% {
location ~ ^/%pma_alias%/(.*\.php)$ { location ~ ^/%pma_alias%/(.*\.php)$ {
alias /usr/share/phpmyadmin/$1; alias /usr/share/phpmyadmin/$1;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -3,7 +3,7 @@ location /%pga_alias% {
location ~ ^/%pga_alias%/(.*\.php)$ { location ~ ^/%pga_alias%/(.*\.php)$ {
alias /usr/share/phppgadmin/$1; alias /usr/share/phppgadmin/$1;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -39,7 +39,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -32,7 +32,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -34,7 +34,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -27,7 +27,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -70,7 +70,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -61,7 +61,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -40,7 +40,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -31,7 +31,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -56,7 +56,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -47,7 +47,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -61,7 +61,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -51,7 +51,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -111,7 +111,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -102,7 +102,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -38,7 +38,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -29,7 +29,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -42,7 +42,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -33,7 +33,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -68,7 +68,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -60,7 +60,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -68,7 +68,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -59,7 +59,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -78,7 +78,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -69,7 +69,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -32,7 +32,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -23,7 +23,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -40,7 +40,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -31,7 +31,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -57,7 +57,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -47,7 +47,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -51,7 +51,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -42,7 +42,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -32,7 +32,7 @@ server {
root %sdocroot%; root %sdocroot%;
location ~ ^/setup/index.php { location ~ ^/setup/index.php {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
@@ -57,7 +57,7 @@ server {
root %sdocroot%; root %sdocroot%;
location ~ ^/update/index.php { location ~ ^/update/index.php {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
@@ -171,7 +171,7 @@ server {
location ~ (index|get|static|report|404|503)\.php$ { location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_buffers 1024 4k; fastcgi_buffers 1024 4k;
fastcgi_connect_timeout 600s; fastcgi_connect_timeout 600s;

View File

@@ -28,7 +28,7 @@ server {
fastcgi_pass %backend_lsnr%; fastcgi_pass %backend_lsnr%;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*; include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
} }
@@ -46,7 +46,7 @@ server {
root %docroot%; root %docroot%;
location ~ ^/update/index.php { location ~ ^/update/index.php {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
@@ -159,7 +159,7 @@ server {
location ~ (index|get|static|report|404|503)\.php$ { location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_buffers 1024 4k; fastcgi_buffers 1024 4k;
fastcgi_connect_timeout 600s; fastcgi_connect_timeout 600s;

View File

@@ -68,7 +68,7 @@ server {
} }
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -60,7 +60,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -51,7 +51,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -66,7 +66,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $fastcgi_script_name =404; try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;

View File

@@ -57,7 +57,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $fastcgi_script_name =404; try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;

View File

@@ -40,7 +40,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -31,7 +31,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -76,7 +76,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -67,7 +67,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param PATH_INFO $path_info; fastcgi_param PATH_INFO $path_info;

View File

@@ -63,7 +63,7 @@ server {
try_files $uri $uri/ /index.php; try_files $uri $uri/ /index.php;
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
#fastcgi_param HTTPS on; #fastcgi_param HTTPS on;

View File

@@ -54,7 +54,7 @@ server {
try_files $uri $uri/ /index.php; try_files $uri $uri/ /index.php;
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
#fastcgi_param HTTPS on; #fastcgi_param HTTPS on;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;

View File

@@ -50,7 +50,7 @@ server {
# Pass the php scripts to FastCGI server specified in upstream declaration. # Pass the php scripts to FastCGI server specified in upstream declaration.
location ~ \.php(/|$) { location ~ \.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_split_path_info ^(.+\.php)(/.*)$;
@@ -81,7 +81,7 @@ server {
# Pass the php scripts to fastcgi server specified in upstream declaration. # Pass the php scripts to fastcgi server specified in upstream declaration.
location ~ \.php(/|$) { location ~ \.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_split_path_info ^(.+\.php)(/.*)$;

View File

@@ -41,7 +41,7 @@ server {
# Pass the php scripts to FastCGI server specified in upstream declaration. # Pass the php scripts to FastCGI server specified in upstream declaration.
location ~ \.php(/|$) { location ~ \.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_split_path_info ^(.+\.php)(/.*)$;
@@ -71,7 +71,7 @@ server {
# Pass the php scripts to fastcgi server specified in upstream declaration. # Pass the php scripts to fastcgi server specified in upstream declaration.
location ~ \.php(/|$) { location ~ \.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_split_path_info ^(.+\.php)(/.*)$;

View File

@@ -50,7 +50,7 @@ server {
location ~* ^/(?:index|piwik)\.php$ { location ~* ^/(?:index|piwik)\.php$ {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -41,7 +41,7 @@ server {
location ~* ^/(?:index|piwik)\.php$ { location ~* ^/(?:index|piwik)\.php$ {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -120,7 +120,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $fastcgi_script_name /index.php$uri&$args =404; try_files $fastcgi_script_name /index.php$uri&$args =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -111,7 +111,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $fastcgi_script_name /index.php$uri&$args =404; try_files $fastcgi_script_name /index.php$uri&$args =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -63,7 +63,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $fastcgi_script_name =404; try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -53,7 +53,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $fastcgi_script_name =404; try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
fastcgi_param front_controller_active true; fastcgi_param front_controller_active true;

View File

@@ -44,7 +44,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -35,7 +35,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -55,7 +55,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -46,7 +46,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -49,7 +49,7 @@ server {
# This rule should only be placed on your development environment # This rule should only be placed on your development environment
# In production, don't include this and don't deploy app_dev.php or config.php # In production, don't include this and don't deploy app_dev.php or config.php
location ~ ^/(app_dev|config)\.php(/|$) { location ~ ^/(app_dev|config)\.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
# When you are using symlinks to link the document root to the # When you are using symlinks to link the document root to the
# current version of your application, you should pass the real # current version of your application, you should pass the real
@@ -70,7 +70,7 @@ server {
# PROD # PROD
location ~ ^/app\.php(/|$) { location ~ ^/app\.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
# When you are using symlinks to link the document root to the # When you are using symlinks to link the document root to the
# current version of your application, you should pass the real # current version of your application, you should pass the real

View File

@@ -40,7 +40,7 @@ server {
# This rule should only be placed on your development environment # This rule should only be placed on your development environment
# In production, don't include this and don't deploy app_dev.php or config.php # In production, don't include this and don't deploy app_dev.php or config.php
location ~ ^/(app_dev|config)\.php(/|$) { location ~ ^/(app_dev|config)\.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
# When you are using symlinks to link the document root to the # When you are using symlinks to link the document root to the
# current version of your application, you should pass the real # current version of your application, you should pass the real
@@ -60,7 +60,7 @@ server {
# PROD # PROD
location ~ ^/app\.php(/|$) { location ~ ^/app\.php(/|$) {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
# When you are using symlinks to link the document root to the # When you are using symlinks to link the document root to the
# current version of your application, you should pass the real # current version of your application, you should pass the real

View File

@@ -51,7 +51,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -42,7 +42,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -62,7 +62,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -53,7 +53,7 @@ server {
location ~ [^/]\.php(/|$)|^/update.php { location ~ [^/]\.php(/|$)|^/update.php {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -56,7 +56,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -47,7 +47,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -63,7 +63,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -54,7 +54,7 @@ server {
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
try_files $uri =404; try_files $uri =404;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@@ -36,7 +36,7 @@ server {
fastcgi_pass %backend_lsnr%; fastcgi_pass %backend_lsnr%;
fastcgi_index index.php; fastcgi_index index.php;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
} }
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;

View File

@@ -27,7 +27,7 @@ server {
fastcgi_pass %backend_lsnr%; fastcgi_pass %backend_lsnr%;
fastcgi_index index.php; fastcgi_index index.php;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
} }
include %home%/%user%/conf/web/%domain%/nginx.conf_*; include %home%/%user%/conf/web/%domain%/nginx.conf_*;

View File

@@ -51,7 +51,7 @@ php_modules_install="mysqlnd mysqli pdo_mysql pgsql pdo sqlite pdo_sqlite pdo_pg
php_modules_disable="" php_modules_disable=""
mod_php="enable" mod_php="enable"
software="nginx software="nginx-system
httpd.${arch} httpd-tools httpd-itk mod_fcgid mod_suphp mod_ssl httpd.${arch} httpd-tools httpd-itk mod_fcgid mod_suphp mod_ssl
MariaDB-client MariaDB-common MariaDB-server MariaDB-client MariaDB-common MariaDB-server
mysql.${arch} mysql-common mysql-server mysql.${arch} mysql-common mysql-server
@@ -93,6 +93,7 @@ help() {
-I, --nopublicip Use local ip [yes|no] default: yes -I, --nopublicip Use local ip [yes|no] default: yes
-u, --uselocalphp Use PHP from local repo [yes|no] default: no -u, --uselocalphp Use PHP from local repo [yes|no] default: no
-C, --usemirrorclamav Use mirrored clamav [yes|no] default: no -C, --usemirrorclamav Use mirrored clamav [yes|no] default: no
-B, --bunkerweb Enable BunkerWeb mode [yes|no] default: no
-s, --hostname Set hostname -s, --hostname Set hostname
-e, --email Set admin email -e, --email Set admin email
-p, --password Set admin password -p, --password Set admin password
@@ -295,6 +296,7 @@ for arg; do
--password) args="${args}-p " ;; --password) args="${args}-p " ;;
--force) args="${args}-f " ;; --force) args="${args}-f " ;;
--with-debs) args="${args}-D " ;; --with-debs) args="${args}-D " ;;
--bunkerweb) args="${args}-B " ;;
--help) args="${args}-h " ;; --help) args="${args}-h " ;;
--nopublicip) args="${args}-I " ;; --nopublicip) args="${args}-I " ;;
--uselocalphp) args="${args}-u" ;; --uselocalphp) args="${args}-u" ;;
@@ -310,9 +312,10 @@ eval set -- "$args"
use_devel="" use_devel=""
# Parsing arguments # Parsing arguments
while getopts "u:I:a:w:v:j:k:m:M:g:d:x:z:Z:c:C:t:i:b:r:o:q:l:y:s:e:p:R:f:Dh" Option; do while getopts "u:I:a:w:v:j:k:m:M:g:d:x:z:Z:c:C:t:i:b:r:o:q:l:y:s:e:p:R:f:D:B:" Option; do
case $Option in case $Option in
a) apache=$OPTARG ;; # Apache a) apache=$OPTARG ;; # Apache
B) bunkerweb=$OPTARG ;; # BunkerWeb mode
w) phpfpm=$OPTARG ;; # PHP-FPM w) phpfpm=$OPTARG ;; # PHP-FPM
o) multiphp=$OPTARG ;; # Multi-PHP o) multiphp=$OPTARG ;; # Multi-PHP
v) vsftpd=$OPTARG ;; # Vsftpd v) vsftpd=$OPTARG ;; # Vsftpd
@@ -377,6 +380,7 @@ set_default_value 'quota' 'no'
set_default_value 'interactive' 'yes' set_default_value 'interactive' 'yes'
set_default_value 'api' 'yes' set_default_value 'api' 'yes'
set_default_value 'nopublicip' 'no' set_default_value 'nopublicip' 'no'
set_default_value 'bunkerweb' 'no'
set_default_port '8083' set_default_port '8083'
set_default_lang 'en' set_default_lang 'en'
set_default_value 'uselocalphp' 'no' set_default_value 'uselocalphp' 'no'
@@ -829,7 +833,7 @@ mkdir nginx httpd php vsftpd proftpd bind exim dovecot clamd
mkdir spamassassin mysql postgresql hestia mkdir spamassassin mysql postgresql hestia
# Backup nginx configuration # Backup nginx configuration
systemctl stop nginx > /dev/null 2>&1 systemctl stop nginx-system > /dev/null 2>&1
cp -r /etc/nginx/* $hst_backups/nginx > /dev/null 2>&1 cp -r /etc/nginx/* $hst_backups/nginx > /dev/null 2>&1
# Backup Apache configuration # Backup Apache configuration
@@ -911,7 +915,7 @@ if [ "$apache" = 'no' ]; then
software=$(echo "$software" | sed -e "s/mod_suphp//") software=$(echo "$software" | sed -e "s/mod_suphp//")
software=$(echo "$software" | sed -e "s/mod_fcgid//") software=$(echo "$software" | sed -e "s/mod_fcgid//")
software=$(echo "$software" | sed -e "s/mod_ssl//") software=$(echo "$software" | sed -e "s/mod_ssl//")
software=$(echo "$software" | sed -e "s/php${php_v}-php.${arch}//") software=$(echo "$software" | sed -e "s/php${php_v}-php//")
software=$(echo "$software" | sed -e "s/brepo-php${php_v}-mod-apache//") software=$(echo "$software" | sed -e "s/brepo-php${php_v}-mod-apache//")
mod_php="disable" mod_php="disable"
fi fi
@@ -956,11 +960,11 @@ if [ "$mysql8" = 'no' ]; then
software=$(echo "$software" | sed -e "s/mysql-common//") software=$(echo "$software" | sed -e "s/mysql-common//")
fi fi
if [ "$mysql" = 'no' ] && [ "$mysql8" = 'no' ]; then if [ "$mysql" = 'no' ] && [ "$mysql8" = 'no' ]; then
software=$(echo "$software" | sed -e "s/php${php_v}-php-mysql.${arch}//") software=$(echo "$software" | sed -e "s/php${php_v}-php-mysql//")
fi fi
if [ "$postgresql" = 'no' ]; then if [ "$postgresql" = 'no' ]; then
software=$(echo "$software" | sed -e "s/postgresql-server//") software=$(echo "$software" | sed -e "s/postgresql-server//")
software=$(echo "$software" | sed -e "s/php${php_v}-php-pgsql.${arch}//") software=$(echo "$software" | sed -e "s/php${php_v}-php-pgsql//")
software=$(echo "$software" | sed -e "s/phppgadmin//") software=$(echo "$software" | sed -e "s/phppgadmin//")
php_modules_install=$(echo "$php_modules_install" | sed -e "s/pgsql//") php_modules_install=$(echo "$php_modules_install" | sed -e "s/pgsql//")
php_modules_install=$(echo "$php_modules_install" | sed -e "s/pdo_pgsql//") php_modules_install=$(echo "$php_modules_install" | sed -e "s/pdo_pgsql//")
@@ -974,12 +978,12 @@ if [ "$iptables" = 'no' ]; then
software=$(echo "$software" | sed -e "s/fail2ban//") software=$(echo "$software" | sed -e "s/fail2ban//")
fi fi
if [ "$phpfpm" = 'yes' ]; then if [ "$phpfpm" = 'yes' ]; then
software=$(echo "$software" | sed -e "s/php${php_v}-php-cgi.${arch}//") software=$(echo "$software" | sed -e "s/php${php_v}-php-cgi//")
software=$(echo "$software" | sed -e "s/httpd-itk//") software=$(echo "$software" | sed -e "s/httpd-itk//")
software=$(echo "$software" | sed -e "s/mod_ruid2 //") software=$(echo "$software" | sed -e "s/mod_ruid2 //")
software=$(echo "$software" | sed -e "s/mod_suphp//") software=$(echo "$software" | sed -e "s/mod_suphp//")
software=$(echo "$software" | sed -e "s/mod_fcgid//") software=$(echo "$software" | sed -e "s/mod_fcgid//")
software=$(echo "$software" | sed -e "s/php${php_v}-php.${arch}//") software=$(echo "$software" | sed -e "s/php${php_v}-php//")
software=$(echo "$software" | sed -e "s/brepo-php${php_v}-mod-apache//") software=$(echo "$software" | sed -e "s/brepo-php${php_v}-mod-apache//")
mod_php="disable" mod_php="disable"
fi fi
@@ -1193,14 +1197,24 @@ if [ "$apache" = 'yes' ]; then
write_config_value "WEB_SSL_PORT" "8443" write_config_value "WEB_SSL_PORT" "8443"
write_config_value "WEB_SSL" "mod_ssl" write_config_value "WEB_SSL" "mod_ssl"
write_config_value "PROXY_SYSTEM" "nginx" write_config_value "PROXY_SYSTEM" "nginx"
if [ "$bunkerweb" = 'yes' ]; then
write_config_value "PROXY_PORT" "8078"
write_config_value "PROXY_SSL_PORT" "8079"
else
write_config_value "PROXY_PORT" "80" write_config_value "PROXY_PORT" "80"
write_config_value "PROXY_SSL_PORT" "443" write_config_value "PROXY_SSL_PORT" "443"
fi
write_config_value "STATS_SYSTEM" "awstats" write_config_value "STATS_SYSTEM" "awstats"
fi fi
if [ "$apache" = 'no' ]; then if [ "$apache" = 'no' ]; then
write_config_value "WEB_SYSTEM" "nginx" write_config_value "WEB_SYSTEM" "nginx"
if [ "$bunkerweb" = 'yes' ]; then
write_config_value "WEB_PORT" "8078"
write_config_value "WEB_SSL_PORT" "8079"
else
write_config_value "WEB_PORT" "80" write_config_value "WEB_PORT" "80"
write_config_value "WEB_SSL_PORT" "443" write_config_value "WEB_SSL_PORT" "443"
fi
write_config_value "WEB_SSL" "openssl" write_config_value "WEB_SSL" "openssl"
write_config_value "STATS_SYSTEM" "awstats" write_config_value "STATS_SYSTEM" "awstats"
fi fi
@@ -1386,17 +1400,17 @@ locale-gen "en_US.utf8" > /dev/null 2>&1
echo "[ * ] Configuring NGINX..." echo "[ * ] Configuring NGINX..."
rm -f /etc/nginx/conf.d/*.conf rm -f /etc/nginx/conf.d/*.conf
cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/ cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /usr/local/hestia/nginx-system/etc/nginx/
cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /etc/nginx/conf.d/ cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /usr/local/hestia/nginx-system/etc/nginx/conf.d/
cp -f $HESTIA_INSTALL_DIR/nginx/0rtt-anti-replay.conf /etc/nginx/conf.d/ cp -f $HESTIA_INSTALL_DIR/nginx/0rtt-anti-replay.conf /usr/local/hestia/nginx-system/etc/nginx/conf.d/
cp -f $HESTIA_INSTALL_DIR/nginx/agents.conf /etc/nginx/conf.d/ cp -f $HESTIA_INSTALL_DIR/nginx/agents.conf /usr/local/hestia/nginx-system/etc/nginx/conf.d/
cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/ cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /usr/local/hestia/nginx-system/etc/nginx/conf.d/
cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /etc/nginx/conf.d/ cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /usr/local/hestia/nginx-system/etc/nginx/conf.d/
cp -f $HESTIA_INSTALL_DIR/logrotate/nginx /etc/logrotate.d/ cp -f $HESTIA_INSTALL_DIR/logrotate/nginx /etc/logrotate.d/
mkdir -p /etc/nginx/conf.d/domains mkdir -p /usr/local/hestia/nginx-system/etc/nginx/conf.d/domains
mkdir -p /etc/nginx/modules-enabled mkdir -p /usr/local/hestia/nginx-system/etc/nginx/modules-enabled
mkdir -p /var/log/nginx/domains mkdir -p /var/log/nginx/domains
mkdir -p /etc/nginx/conf.d/main mkdir -p /usr/local/hestia/nginx-system/etc/nginx/conf.d/main
# Update dns servers in 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 for nameserver in $(grep -is '^nameserver' /etc/resolv.conf | cut -d' ' -f2 | tr '\r\n' ' ' | xargs); do
@@ -1409,11 +1423,11 @@ for nameserver in $(grep -is '^nameserver' /etc/resolv.conf | cut -d' ' -f2 | tr
fi fi
done done
if [ -n "$resolver" ]; then if [ -n "$resolver" ]; then
sed -i "s/1.1.1.1 8.8.8.8/$resolver/g" /etc/nginx/nginx.conf sed -i "s/1.1.1.1 8.8.8.8/$resolver/g" /usr/local/hestia/nginx-system/etc/nginx/nginx.conf
fi fi
# https://github.com/ergin/nginx-cloudflare-real-ip/ # https://github.com/ergin/nginx-cloudflare-real-ip/
CLOUDFLARE_FILE_PATH='/etc/nginx/conf.d/cloudflare.inc' CLOUDFLARE_FILE_PATH='/usr/local/hestia/nginx-system/etc/nginx/conf.d/cloudflare.inc'
echo "#Cloudflare" > $CLOUDFLARE_FILE_PATH echo "#Cloudflare" > $CLOUDFLARE_FILE_PATH
echo "" >> $CLOUDFLARE_FILE_PATH echo "" >> $CLOUDFLARE_FILE_PATH
@@ -1430,7 +1444,7 @@ done
echo "" >> $CLOUDFLARE_FILE_PATH echo "" >> $CLOUDFLARE_FILE_PATH
echo "real_ip_header CF-Connecting-IP;" >> $CLOUDFLARE_FILE_PATH echo "real_ip_header CF-Connecting-IP;" >> $CLOUDFLARE_FILE_PATH
systemctl enable nginx --now >> $LOG systemctl enable nginx-system --now >> $LOG
check_result $? "nginx start failed" check_result $? "nginx start failed"
#----------------------------------------------------------# #----------------------------------------------------------#
@@ -1478,7 +1492,9 @@ if [ "$apache" = 'yes' ]; then
if [ -e /etc/httpd/conf.dmod_suphp.conf ]; then if [ -e /etc/httpd/conf.dmod_suphp.conf ]; then
cp /etc/httpd/conf.d/mod_suphp.conf /etc/httpd/conf.h.d/mod_suphp.conf cp /etc/httpd/conf.d/mod_suphp.conf /etc/httpd/conf.h.d/mod_suphp.conf
fi fi
if [ -e "/etc/httpd/conf.d.prep/php${php_v}.conf" ]; then
ln -s "/etc/httpd/conf.d.prep/php${php_v}.conf" /etc/httpd/conf.modules.d/09-mod-php.conf ln -s "/etc/httpd/conf.d.prep/php${php_v}.conf" /etc/httpd/conf.modules.d/09-mod-php.conf
fi
fi fi

View File

@@ -1,4 +1,4 @@
/var/log/nginx/*log /var/log/nginx/domains/*log { /var/log/nginx/*log /var/log/nginx/domains/*log /usr/local/hestia/nginx-system/var/log/nginx/*log {
rotate 4 rotate 4
weekly weekly
missingok missingok
@@ -8,6 +8,6 @@
create 640 create 640
sharedscripts sharedscripts
postrotate postrotate
[ -f /run/nginx.pid ] && kill -USR1 `cat /run/nginx.pid` [ -f /run/nginx-system.pid ] && kill -USR1 `cat /run/nginx-system.pid`
endscript endscript
} }

View File

@@ -2,10 +2,10 @@
user apache; user apache;
worker_processes auto; worker_processes auto;
worker_rlimit_nofile 65535; worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log; error_log /usr/local/hestia/nginx-system/var/log/nginx/error.log;
pid /run/nginx.pid; pid /run/nginx-system.pid;
include /etc/nginx/conf.d/main/*.conf; include /usr/local/hestia/nginx-system/etc/nginx/conf.d/main/*.conf;
include /etc/nginx/modules-enabled/*.conf; include /usr/local/hestia/nginx-system/etc/nginx/modules-enabled/*.conf;
# Worker config # Worker config
events { events {
@@ -66,7 +66,7 @@ http {
log_not_found off; log_not_found off;
access_log off; access_log off;
# Mime settings # Mime settings
include /etc/nginx/mime.types; include /usr/local/hestia/nginx-system/etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
# Compression # Compression
gzip on; gzip on;
@@ -79,7 +79,7 @@ http {
gzip_types text/css text/javascript text/js text/plain text/richtext text/shtml text/x-component text/x-java-source text/x-markdown text/x-script text/xml image/bmp image/svg+xml image/vnd.microsoft.icon image/x-icon font/otf font/ttf font/x-woff multipart/bag multipart/mixed application/eot application/font application/font-sfnt application/font-woff application/javascript application/javascript-binast application/json application/ld+json application/manifest+json application/opentype application/otf application/rss+xml application/ttf application/truetype application/vnd.api+json application/vnd.ms-fontobject application/wasm application/xhtml+xml application/xml application/xml+rss application/x-httpd-cgi application/x-javascript application/x-opentype application/x-otf application/x-perl application/x-protobuf application/x-ttf; gzip_types text/css text/javascript text/js text/plain text/richtext text/shtml text/x-component text/x-java-source text/x-markdown text/x-script text/xml image/bmp image/svg+xml image/vnd.microsoft.icon image/x-icon font/otf font/ttf font/x-woff multipart/bag multipart/mixed application/eot application/font application/font-sfnt application/font-woff application/javascript application/javascript-binast application/json application/ld+json application/manifest+json application/opentype application/otf application/rss+xml application/ttf application/truetype application/vnd.api+json application/vnd.ms-fontobject application/wasm application/xhtml+xml application/xml application/xml+rss application/x-httpd-cgi application/x-javascript application/x-opentype application/x-otf application/x-perl application/x-protobuf application/x-ttf;
gzip_proxied any; gzip_proxied any;
# Cloudflare IPs # Cloudflare IPs
include /etc/nginx/conf.d/cloudflare.inc; include /usr/local/hestia/nginx-system/etc/nginx/conf.d/cloudflare.inc;
# SSL PCI compliance # SSL PCI compliance
ssl_buffer_size 1369; ssl_buffer_size 1369;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256"; ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256";
@@ -99,14 +99,14 @@ http {
error_page 410 /error/410.html; error_page 410 /error/410.html;
error_page 500 501 502 503 504 505 /error/50x.html; error_page 500 501 502 503 504 505 /error/50x.html;
# Proxy cache # Proxy cache
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m; proxy_cache_path /usr/local/hestia/nginx-system/var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m;
proxy_cache_key "$scheme$request_method$host$request_uri"; proxy_cache_key "$scheme$request_method$host$request_uri";
proxy_temp_path /var/cache/nginx/temp; proxy_temp_path /usr/local/hestia/nginx-system/var/cache/nginx/temp;
proxy_ignore_headers Cache-Control Expires; proxy_ignore_headers Cache-Control Expires;
proxy_cache_use_stale error timeout invalid_header updating http_502; proxy_cache_use_stale error timeout invalid_header updating http_502;
proxy_cache_valid any 1d; proxy_cache_valid any 1d;
# FastCGI cache # FastCGI cache
fastcgi_cache_path /var/cache/nginx/micro levels=1:2 keys_zone=microcache:10m inactive=30m max_size=1024m; fastcgi_cache_path /usr/local/hestia/nginx-system/var/cache/nginx/micro levels=1:2 keys_zone=microcache:10m inactive=30m max_size=1024m;
fastcgi_cache_key "$scheme$request_method$host$request_uri"; fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_ignore_headers Cache-Control Expires Set-Cookie; fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503; fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
@@ -125,6 +125,6 @@ http {
open_file_cache_min_uses 2; open_file_cache_min_uses 2;
open_file_cache_errors off; open_file_cache_errors off;
# Wildcard include # Wildcard include
include /etc/nginx/conf.d/*.conf; include /usr/local/hestia/nginx-system/etc/nginx/conf.d/*.conf;
include /etc/nginx/conf.d/domains/*.conf; include /usr/local/hestia/nginx-system/etc/nginx/conf.d/domains/*.conf;
} }

View File

@@ -13,7 +13,7 @@ location /%pma_alias% {
location ~ ^/%pma_alias%/(.*\.php)$ { location ~ ^/%pma_alias%/(.*\.php)$ {
alias /usr/share/phpmyadmin/$1; alias /usr/share/phpmyadmin/$1;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -3,7 +3,7 @@ location /%pga_alias% {
location ~ ^/%pga_alias%/(.*\.php)$ { location ~ ^/%pga_alias%/(.*\.php)$ {
alias /usr/share/phppgadmin/$1; alias /usr/share/phppgadmin/$1;
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -39,7 +39,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -32,7 +32,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -33,7 +33,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty; fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;

View File

@@ -27,7 +27,7 @@ server {
} }
location ~ ^/(.*\.php)$ { location ~ ^/(.*\.php)$ {
include /etc/nginx/fastcgi_params; include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_paramsystem/etc/nginx/fastcgi_params;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;

View File

@@ -43,12 +43,5 @@
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_* IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc IncludeOptional /etc/httpd/conf.h.d/*.inc
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups apache
</IfModule>
<IfModule mpm_itk.c>
AssignUserID %user% %group%
</IfModule>
</VirtualHost> </VirtualHost>

View File

@@ -38,12 +38,5 @@
</Directory> </Directory>
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_* IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc IncludeOptional /etc/httpd/conf.h.d/*.inc
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups apache
</IfModule>
<IfModule mpm_itk.c>
AssignUserID %user% %group%
</IfModule>
</VirtualHost> </VirtualHost>

Some files were not shown because too many files have changed in this diff Show More