Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cb55905cc | ||
|
|
d76624ff43 |
@@ -79,9 +79,9 @@ EOF
|
||||
chown root:$user $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;"
|
||||
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 [ -z "$(grep "=${domain}:" $conf)" ]; then
|
||||
echo "$str" >> $conf
|
||||
@@ -90,7 +90,7 @@ else
|
||||
echo "$str" >> $conf
|
||||
fi
|
||||
|
||||
mkdir -p /var/cache/nginx/micro/$domain
|
||||
mkdir -p /usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Hestia #
|
||||
|
||||
@@ -68,13 +68,13 @@ if [ "$type" = "pma" ] || [ "$type" = "PMA" ] || [ "$type" = "phpmyadmin" ]; the
|
||||
$BIN/v-restart-service httpd
|
||||
fi
|
||||
|
||||
if [ -e "/etc/nginx/conf.d/phpmyadmin.inc" ]; then
|
||||
rm -f /etc/nginx/conf.d/phpmyadmin.inc
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.inc
|
||||
sed -i "s|%pma_alias%|$alias|g" /etc/nginx/conf.d/phpmyadmin.inc
|
||||
if [ -e "/usr/local/hestia/nginx-system/etc/nginx/conf.d/phpmyadmin.inc" ]; then
|
||||
rm -f /usr/local/hestia/nginx-system/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" /usr/local/hestia/nginx-system/etc/nginx/conf.d/phpmyadmin.inc
|
||||
|
||||
# Restart services
|
||||
$BIN/v-restart-service nginx
|
||||
$BIN/v-restart-service nginx-system
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -105,13 +105,13 @@ if [ "$type" = "pga" ] || [ "$type" = "PGA" ] || [ "$type" = "phppgadmin" ]; the
|
||||
$BIN/v-restart-service httpd
|
||||
fi
|
||||
|
||||
if [ -e "/etc/nginx/conf.d/phppgadmin.inc" ]; then
|
||||
rm -f /etc/nginx/conf.d/phppgadmin.inc
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /etc/nginx/conf.d/phppgadmin.inc
|
||||
sed -i "s|%pga_alias%|$alias|g" /etc/nginx/conf.d/phppgadmin.inc
|
||||
if [ -e "/usr/local/hestia/nginx-system/etc/nginx/conf.d/phppgadmin.inc" ]; then
|
||||
rm -f /usr/local/hestia/nginx-system/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" /usr/local/hestia/nginx-system/etc/nginx/conf.d/phppgadmin.inc
|
||||
|
||||
# Restart services
|
||||
$BIN/v-restart-service nginx
|
||||
$BIN/v-restart-service nginx-system
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ fi
|
||||
|
||||
# Defining dst config path
|
||||
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' ;;
|
||||
apache2) dst='/etc/apache2/apache2.conf' ;;
|
||||
exim) dst='/etc/exim/exim.conf' ;;
|
||||
|
||||
@@ -31,7 +31,7 @@ SERVICE_NAME="$1"
|
||||
|
||||
case "$SERVICE_NAME" in
|
||||
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=$?
|
||||
exit $V_RESULT
|
||||
;;
|
||||
@@ -47,5 +47,3 @@ esac
|
||||
|
||||
# Something like error, we shouldn't be here
|
||||
exit 1
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
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
|
||||
sed -i "/ keys_zone=$domain/d" $conf
|
||||
if [ ! -s "$conf" ]; then
|
||||
@@ -58,7 +58,7 @@ if [ -f "$conf" ]; then
|
||||
fi
|
||||
|
||||
# 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
|
||||
fi
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ csv_list() {
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Defining config path
|
||||
config_path='/etc/nginx/nginx.conf'
|
||||
config_path='/usr/local/hestia/nginx-system/etc/nginx/nginx.conf'
|
||||
|
||||
# Defining keys
|
||||
keys="worker_processes |worker_connections |send_timeout"
|
||||
|
||||
@@ -48,13 +48,13 @@ conf=$(grep "DOMAIN='$domain'" "$USER_DATA/web.conf")
|
||||
parse_object_kv_list "$conf"
|
||||
|
||||
# Purge nginx FastCGI cache
|
||||
if [ -d "/var/cache/nginx/micro/$domain" ]; then
|
||||
rm -rf /var/cache/nginx/micro/$domain/*
|
||||
if [ -d "/usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain" ]; then
|
||||
rm -rf /usr/local/hestia/nginx-system/var/cache/nginx/micro/$domain/*
|
||||
fi
|
||||
|
||||
# Purge nginx proxy cache
|
||||
if [ -d "/var/cache/nginx/$domain" ]; then
|
||||
rm -rf /var/cache/nginx/$domain/*
|
||||
if [ -d "/usr/local/hestia/nginx-system/var/cache/nginx/$domain" ]; then
|
||||
rm -rf /usr/local/hestia/nginx-system/var/cache/nginx/$domain/*
|
||||
fi
|
||||
|
||||
#----------------------------------------------------------#
|
||||
|
||||
@@ -25,10 +25,14 @@ send_email_report() {
|
||||
email=$(echo "$email" | cut -f 2 -d "'")
|
||||
tmpfile=$(mktemp)
|
||||
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
|
||||
service "$PROXY_SYSTEM" restart >> $tmpfile 2>&1
|
||||
if [ "$PROXY_SYSTEM" = "nginx" ]; then
|
||||
service nginx-system restart >> $tmpfile 2>&1
|
||||
else
|
||||
service "$PROXY_SYSTEM" restart >> $tmpfile 2>&1
|
||||
fi
|
||||
fi
|
||||
cat "$tmpfile" | $SENDMAIL -s "$subj" "$email"
|
||||
if [ "$DEBUG_MODE" = "true" ]; then
|
||||
|
||||
@@ -73,7 +73,7 @@ for service in $service_list; do
|
||||
$BIN/v-stop-firewall
|
||||
$BIN/v-update-firewall
|
||||
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" ] && [ \
|
||||
"$service" = "nginx" -o \
|
||||
"$service" = "httpd" -o \
|
||||
@@ -86,10 +86,19 @@ for service in $service_list; do
|
||||
"$service" = "proftpd" -o \
|
||||
"$service" = "ssh" -o \
|
||||
"$service" = "fail2ban" ]; then
|
||||
systemctl reload-or-restart "$service" >> $log 2>&1
|
||||
if [ "$service" = "nginx" ]; then
|
||||
systemctl reload-or-restart nginx-system >> $log 2>&1
|
||||
else
|
||||
systemctl reload-or-restart "$service" >> $log 2>&1
|
||||
fi
|
||||
else
|
||||
systemctl reset-failed "$service" >> $log 2>&1
|
||||
systemctl restart "$service" >> $log 2>&1
|
||||
if [ "$service" = "nginx" ]; then
|
||||
systemctl reset-failed nginx-system >> $log 2>&1
|
||||
systemctl restart nginx-system >> $log 2>&1
|
||||
else
|
||||
systemctl reset-failed "$service" >> $log 2>&1
|
||||
systemctl restart "$service" >> $log 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check the result of the service restart and report whether it failed.
|
||||
|
||||
@@ -86,7 +86,11 @@ if [ -n "$old_ip" ]; then
|
||||
|
||||
# Updating PROXY
|
||||
if [ -n "$PROXY_SYSTEM" ]; then
|
||||
cd /etc/$PROXY_SYSTEM/$pconfd
|
||||
if [ "$PROXY_SYSTEM" = "nginx" ]; then
|
||||
cd /usr/local/hestia/nginx-system/etc/nginx/$pconfd
|
||||
else
|
||||
cd /etc/$PROXY_SYSTEM/$pconfd
|
||||
fi
|
||||
if [ -e "$old_ip.conf" ]; then
|
||||
mv $old_ip.conf $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
|
||||
if [ -n "$WEB_SYSTEM" ]; then
|
||||
cd /etc/$WEB_SYSTEM/$confd
|
||||
if [ "$WEB_SYSTEM" = "nginx" ]; then
|
||||
cd /usr/local/hestia/nginx-system/etc/nginx/$confd
|
||||
else
|
||||
cd /etc/$WEB_SYSTEM/$confd
|
||||
fi
|
||||
|
||||
if [ -e "$old_ip.conf" ]; then
|
||||
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')"
|
||||
netmask="$(convert_cidr "$prefixlen")"
|
||||
$BIN/v-add-sys-ip "$ip" "$netmask" "$interface"
|
||||
elif [ -e "/etc/nginx/conf.d/$ip.conf" ]; then
|
||||
process_http2_directive "/etc/nginx/conf.d/$ip.conf"
|
||||
elif [ -e "/usr/local/hestia/nginx-system/etc/nginx/conf.d/$ip.conf" ]; then
|
||||
process_http2_directive "/usr/local/hestia/nginx-system/etc/nginx/conf.d/$ip.conf"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
try_files $uri =404;
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
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
|
||||
include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
|
||||
|
||||
111
func/domain.sh
111
func/domain.sh
@@ -383,7 +383,11 @@ add_web_config() {
|
||||
|
||||
if [[ "$TPLNM" =~ stpl$ ]]; then
|
||||
rm -f /etc/$1/$confd/domains/$domain.ssl.conf
|
||||
ln -s $conf /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
|
||||
fi
|
||||
|
||||
# Rename/Move extra SSL config files
|
||||
find=$(find $HOMEDIR/$user/conf/web/*.$domain.org* 2> /dev/null)
|
||||
@@ -399,8 +403,13 @@ add_web_config() {
|
||||
fi
|
||||
done
|
||||
else
|
||||
rm -f /etc/$1/$confd/domains/$domain.conf
|
||||
ln -s $conf /etc/$1/$confd/domains/$domain.conf
|
||||
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
|
||||
rm -f /etc/$1/$confd/domains/$domain.conf
|
||||
ln -s $conf /etc/$1/$confd/domains/$domain.conf
|
||||
fi
|
||||
# Rename/Move extra config files
|
||||
find=$(find $HOMEDIR/$user/conf/web/*.$domain.org* 2> /dev/null)
|
||||
for f in $find; do
|
||||
@@ -518,17 +527,29 @@ del_web_config() {
|
||||
rm -f $legacyconf
|
||||
|
||||
# Remove old global includes file
|
||||
rm -f /etc/$1/$confd/hestia.conf
|
||||
if [ "$1" = "nginx" ]; then
|
||||
rm -f /usr/local/hestia/nginx-system/etc/$1/$confd/hestia.conf
|
||||
else
|
||||
rm -f /etc/$1/$confd/hestia.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove domain configuration files and clean up symbolic links
|
||||
rm -f "$conf"
|
||||
|
||||
if [ -n "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" = "$1" ]; then
|
||||
rm -f "/etc/$WEB_SYSTEM/$confd/domains/$confname"
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$PROXY_SYSTEM" ] && [ "$PROXY_SYSTEM" = "$1" ]; then
|
||||
rm -f "/etc/$PROXY_SYSTEM/$confd/domains/$confname"
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -917,8 +938,16 @@ del_mail_ssl_config() {
|
||||
|
||||
# Remove SSL vhost configuration
|
||||
rm -f $HOMEDIR/$user/conf/mail/$domain/*.*ssl.conf
|
||||
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
|
||||
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$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
|
||||
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
|
||||
fi
|
||||
|
||||
# Remove SSL certificates
|
||||
rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/*
|
||||
@@ -1006,13 +1035,23 @@ add_webmail_config() {
|
||||
if [[ "$2" =~ stpl$ ]]; then
|
||||
if [ -n "$WEB_SYSTEM" ]; then
|
||||
forcessl="$HOMEDIR/$user/conf/mail/$domain/$WEB_SYSTEM.forcessl.conf"
|
||||
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.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
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
|
||||
fi
|
||||
fi
|
||||
if [ -n "$PROXY_SYSTEM" ]; then
|
||||
forcessl="$HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.forcessl.conf"
|
||||
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.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
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# Add rewrite rules to force HTTPS/SSL connections
|
||||
@@ -1027,12 +1066,22 @@ add_webmail_config() {
|
||||
find $HOMEDIR/$user/conf/mail/ -maxdepth 1 -type f \( -name "$domain.*" -o -name "ssl.$domain.*" -o -name "*nginx.$domain.*" \) -exec rm {} \;
|
||||
else
|
||||
if [ -n "$WEB_SYSTEM" ]; then
|
||||
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
|
||||
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
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
|
||||
fi
|
||||
fi
|
||||
if [ -n "$PROXY_SYSTEM" ]; then
|
||||
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
|
||||
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
|
||||
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf
|
||||
fi
|
||||
fi
|
||||
# Clear old configurations
|
||||
find $HOMEDIR/$user/conf/mail/ -maxdepth 1 -type f \( -name "$domain.*" \) -exec rm {} \;
|
||||
@@ -1053,12 +1102,20 @@ del_webmail_config() {
|
||||
fi
|
||||
if [ -n "$WEB_SYSTEM" ]; then
|
||||
rm -f $HOMEDIR/$user/$confd/mail/$domain/$WEB_SYSTEM.conf
|
||||
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.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
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$PROXY_SYSTEM" ]; then
|
||||
rm -f $HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.*conf
|
||||
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.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
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1076,12 +1133,20 @@ del_webmail_ssl_config() {
|
||||
fi
|
||||
if [ -n "$WEB_SYSTEM" ]; then
|
||||
rm -f $HOMEDIR/$user/conf/mail/$domain/$WEB_SYSTEM.*ssl.conf
|
||||
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$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
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$PROXY_SYSTEM" ]; then
|
||||
rm -f $HOMEDIR/$user/conf/mail/$domain/$PROXY_SYSTEM.*ssl.conf
|
||||
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.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
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1187,14 +1252,14 @@ is_base_domain_owner() {
|
||||
#----------------------------------------------------------#
|
||||
|
||||
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
|
||||
new_param="$(echo "$old_param" | sed 's/\shttp2//')"
|
||||
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")
|
||||
else
|
||||
if version_ge "$(nginx -v 2>&1 | cut -d'/' -f2)" "1.25.1"; then
|
||||
echo "http2 on;" > /etc/nginx/conf.d/http2-directive.conf
|
||||
if version_ge "$(/usr/local/hestia/nginx-system/sbin/nginx -v 2>&1 | cut -d'/' -f2)" "1.25.1"; then
|
||||
echo "http2 on;" > /usr/local/hestia/nginx-system/etc/nginx/conf.d/http2-directive.conf
|
||||
|
||||
while IFS= read -r old_param; do
|
||||
new_param="$(echo "$old_param" | sed 's/\shttp2//')"
|
||||
|
||||
@@ -56,11 +56,12 @@ upgrade_health_check() {
|
||||
|
||||
upgrade_welcome_message() {
|
||||
echo
|
||||
echo ' _ _ _ _ ____ ____ '
|
||||
echo ' | | | | ___ ___| |_(_) __ _ / ___| _ \ '
|
||||
echo ' | |_| |/ _ \/ __| __| |/ _` | | | |_) | '
|
||||
echo ' | _ | __/\__ \ |_| | (_| | |___| __/ '
|
||||
echo ' |_| |_|\___||___/\__|_|\__,_|\____|_| '
|
||||
echo ' _ _ _ _ ____ ____ '
|
||||
echo ' | | | | ___ ___| |_(_) __ _ / ___| _ \ _ _ . . '
|
||||
echo ' | |_| |/ _ \/ __| __| |/ _` | | | |_) | | \| \|\/| '
|
||||
echo ' | _ | __/\__ \ |_| | (_| | |___| __/ |_/|_/| | '
|
||||
echo ' |_| |_|\___||___/\__|_|\__,_|\____|_| | \| | | '
|
||||
echo " "
|
||||
echo " "
|
||||
echo " Hestia Control Panel Software Update "
|
||||
echo " Version: ${DISPLAY_VER}"
|
||||
@@ -535,7 +536,7 @@ upgrade_cloudflare_ip() {
|
||||
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
|
||||
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 "# Cloudflare IP Ranges" > $cf_inc
|
||||
|
||||
0
hestiacp/install/hst-install.sh
Normal file
0
hestiacp/install/hst-install.sh
Normal file
@@ -13,7 +13,7 @@ location /%pma_alias% {
|
||||
|
||||
location ~ ^/%pma_alias%/(.*\.php)$ {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -3,7 +3,7 @@ location /%pga_alias% {
|
||||
|
||||
location ~ ^/%pga_alias%/(.*\.php)$ {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -39,7 +39,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(.*\.php)$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -32,7 +32,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(.*\.php)$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -34,7 +34,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(.*\.php)$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -27,7 +27,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(.*\.php)$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -70,7 +70,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -61,7 +61,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -40,7 +40,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -31,7 +31,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -56,7 +56,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -47,7 +47,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -61,7 +61,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -51,7 +51,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -111,7 +111,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -102,7 +102,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -38,7 +38,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -29,7 +29,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -42,7 +42,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -33,7 +33,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -68,7 +68,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -60,7 +60,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -68,7 +68,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -59,7 +59,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -78,7 +78,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -69,7 +69,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -32,7 +32,7 @@ server {
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -23,7 +23,7 @@ server {
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -40,7 +40,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -31,7 +31,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -57,7 +57,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -47,7 +47,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -51,7 +51,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -42,7 +42,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -32,7 +32,7 @@ server {
|
||||
root %sdocroot%;
|
||||
|
||||
location ~ ^/setup/index.php {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
@@ -57,7 +57,7 @@ server {
|
||||
root %sdocroot%;
|
||||
|
||||
location ~ ^/update/index.php {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
@@ -171,7 +171,7 @@ server {
|
||||
location ~ (index|get|static|report|404|503)\.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_buffers 1024 4k;
|
||||
fastcgi_connect_timeout 600s;
|
||||
|
||||
@@ -28,7 +28,7 @@ server {
|
||||
|
||||
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*;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ server {
|
||||
root %docroot%;
|
||||
|
||||
location ~ ^/update/index.php {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
@@ -159,7 +159,7 @@ server {
|
||||
location ~ (index|get|static|report|404|503)\.php$ {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_buffers 1024 4k;
|
||||
fastcgi_connect_timeout 600s;
|
||||
|
||||
@@ -68,7 +68,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -60,7 +60,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -51,7 +51,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -66,7 +66,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_intercept_errors on;
|
||||
|
||||
@@ -57,7 +57,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_intercept_errors on;
|
||||
|
||||
@@ -40,7 +40,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -31,7 +31,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -76,7 +76,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -67,7 +67,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
|
||||
@@ -63,7 +63,7 @@ server {
|
||||
try_files $uri $uri/ /index.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 HTTPS on;
|
||||
|
||||
@@ -54,7 +54,7 @@ server {
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~ \.php(?:$|/) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
#fastcgi_param HTTPS on;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
@@ -50,7 +50,7 @@ server {
|
||||
|
||||
# Pass the php scripts to FastCGI server specified in upstream declaration.
|
||||
location ~ \.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
@@ -81,7 +81,7 @@ server {
|
||||
|
||||
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||
location ~ \.php(/|$) {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
@@ -41,7 +41,7 @@ server {
|
||||
|
||||
# Pass the php scripts to FastCGI server specified in upstream declaration.
|
||||
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_split_path_info ^(.+\.php)(/.*)$;
|
||||
@@ -71,7 +71,7 @@ server {
|
||||
|
||||
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||
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_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
@@ -50,7 +50,7 @@ server {
|
||||
location ~* ^/(?:index|piwik)\.php$ {
|
||||
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 SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -41,7 +41,7 @@ server {
|
||||
location ~* ^/(?:index|piwik)\.php$ {
|
||||
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;
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -111,7 +111,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -63,7 +63,7 @@ server {
|
||||
location ~ \.php$ {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -53,7 +53,7 @@ server {
|
||||
location ~ \.php$ {
|
||||
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_param front_controller_active true;
|
||||
|
||||
@@ -44,7 +44,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -35,7 +35,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -55,7 +55,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -46,7 +46,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -49,7 +49,7 @@ server {
|
||||
# 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
|
||||
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
|
||||
# current version of your application, you should pass the real
|
||||
@@ -70,7 +70,7 @@ server {
|
||||
|
||||
# PROD
|
||||
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
|
||||
# current version of your application, you should pass the real
|
||||
|
||||
@@ -40,7 +40,7 @@ server {
|
||||
# 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
|
||||
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
|
||||
# current version of your application, you should pass the real
|
||||
@@ -60,7 +60,7 @@ server {
|
||||
|
||||
# PROD
|
||||
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
|
||||
# current version of your application, you should pass the real
|
||||
|
||||
@@ -51,7 +51,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -42,7 +42,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -62,7 +62,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -53,7 +53,7 @@ server {
|
||||
location ~ [^/]\.php(/|$)|^/update.php {
|
||||
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_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -56,7 +56,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -47,7 +47,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -63,7 +63,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -54,7 +54,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -36,7 +36,7 @@ server {
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
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_*;
|
||||
|
||||
@@ -27,7 +27,7 @@ server {
|
||||
|
||||
fastcgi_pass %backend_lsnr%;
|
||||
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_*;
|
||||
|
||||
@@ -51,7 +51,7 @@ php_modules_install="mysqlnd mysqli pdo_mysql pgsql pdo sqlite pdo_sqlite pdo_pg
|
||||
php_modules_disable=""
|
||||
mod_php="enable"
|
||||
|
||||
software="nginx
|
||||
software="nginx-system
|
||||
httpd.${arch} httpd-tools httpd-itk mod_fcgid mod_suphp mod_ssl
|
||||
MariaDB-client MariaDB-common MariaDB-server
|
||||
mysql.${arch} mysql-common mysql-server
|
||||
@@ -93,6 +93,7 @@ help() {
|
||||
-I, --nopublicip Use local ip [yes|no] default: yes
|
||||
-u, --uselocalphp Use PHP from local repo [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
|
||||
-e, --email Set admin email
|
||||
-p, --password Set admin password
|
||||
@@ -295,6 +296,7 @@ for arg; do
|
||||
--password) args="${args}-p " ;;
|
||||
--force) args="${args}-f " ;;
|
||||
--with-debs) args="${args}-D " ;;
|
||||
--bunkerweb) args="${args}-B " ;;
|
||||
--help) args="${args}-h " ;;
|
||||
--nopublicip) args="${args}-I " ;;
|
||||
--uselocalphp) args="${args}-u" ;;
|
||||
@@ -310,9 +312,10 @@ eval set -- "$args"
|
||||
use_devel=""
|
||||
|
||||
# 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
|
||||
a) apache=$OPTARG ;; # Apache
|
||||
B) bunkerweb=$OPTARG ;; # BunkerWeb mode
|
||||
w) phpfpm=$OPTARG ;; # PHP-FPM
|
||||
o) multiphp=$OPTARG ;; # Multi-PHP
|
||||
v) vsftpd=$OPTARG ;; # Vsftpd
|
||||
@@ -377,6 +380,7 @@ set_default_value 'quota' 'no'
|
||||
set_default_value 'interactive' 'yes'
|
||||
set_default_value 'api' 'yes'
|
||||
set_default_value 'nopublicip' 'no'
|
||||
set_default_value 'bunkerweb' 'no'
|
||||
set_default_port '8083'
|
||||
set_default_lang 'en'
|
||||
set_default_value 'uselocalphp' 'no'
|
||||
@@ -829,7 +833,7 @@ mkdir nginx httpd php vsftpd proftpd bind exim dovecot clamd
|
||||
mkdir spamassassin mysql postgresql hestia
|
||||
|
||||
# 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
|
||||
|
||||
# Backup Apache configuration
|
||||
@@ -1193,14 +1197,24 @@ if [ "$apache" = 'yes' ]; then
|
||||
write_config_value "WEB_SSL_PORT" "8443"
|
||||
write_config_value "WEB_SSL" "mod_ssl"
|
||||
write_config_value "PROXY_SYSTEM" "nginx"
|
||||
write_config_value "PROXY_PORT" "80"
|
||||
write_config_value "PROXY_SSL_PORT" "443"
|
||||
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_SSL_PORT" "443"
|
||||
fi
|
||||
write_config_value "STATS_SYSTEM" "awstats"
|
||||
fi
|
||||
if [ "$apache" = 'no' ]; then
|
||||
write_config_value "WEB_SYSTEM" "nginx"
|
||||
write_config_value "WEB_PORT" "80"
|
||||
write_config_value "WEB_SSL_PORT" "443"
|
||||
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_SSL_PORT" "443"
|
||||
fi
|
||||
write_config_value "WEB_SSL" "openssl"
|
||||
write_config_value "STATS_SYSTEM" "awstats"
|
||||
fi
|
||||
@@ -1386,17 +1400,17 @@ locale-gen "en_US.utf8" > /dev/null 2>&1
|
||||
|
||||
echo "[ * ] Configuring NGINX..."
|
||||
rm -f /etc/nginx/conf.d/*.conf
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /etc/nginx/
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/status.conf /etc/nginx/conf.d/
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/0rtt-anti-replay.conf /etc/nginx/conf.d/
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/agents.conf /etc/nginx/conf.d/
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /etc/nginx/conf.d/
|
||||
cp -f $HESTIA_INSTALL_DIR/nginx/nginx.conf /usr/local/hestia/nginx-system/etc/nginx/
|
||||
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 /usr/local/hestia/nginx-system/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 /usr/local/hestia/nginx-system/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/
|
||||
mkdir -p /etc/nginx/conf.d/domains
|
||||
mkdir -p /etc/nginx/modules-enabled
|
||||
mkdir -p /usr/local/hestia/nginx-system/etc/nginx/conf.d/domains
|
||||
mkdir -p /usr/local/hestia/nginx-system/etc/nginx/modules-enabled
|
||||
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
|
||||
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
|
||||
done
|
||||
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
|
||||
|
||||
# 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_FILE_PATH
|
||||
|
||||
@@ -1430,7 +1444,7 @@ done
|
||||
echo "" >> $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"
|
||||
|
||||
#----------------------------------------------------------#
|
||||
|
||||
@@ -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
|
||||
weekly
|
||||
missingok
|
||||
@@ -8,6 +8,6 @@
|
||||
create 640
|
||||
sharedscripts
|
||||
postrotate
|
||||
[ -f /run/nginx.pid ] && kill -USR1 `cat /run/nginx.pid`
|
||||
[ -f /run/nginx-system.pid ] && kill -USR1 `cat /run/nginx-system.pid`
|
||||
endscript
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
user apache;
|
||||
worker_processes auto;
|
||||
worker_rlimit_nofile 65535;
|
||||
error_log /var/log/nginx/error.log;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/conf.d/main/*.conf;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
error_log /usr/local/hestia/nginx-system/var/log/nginx/error.log;
|
||||
pid /run/nginx-system.pid;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/conf.d/main/*.conf;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
# Worker config
|
||||
events {
|
||||
@@ -66,7 +66,7 @@ http {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
# Mime settings
|
||||
include /etc/nginx/mime.types;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
# Compression
|
||||
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_proxied any;
|
||||
# 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_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";
|
||||
@@ -99,14 +99,14 @@ http {
|
||||
error_page 410 /error/410.html;
|
||||
error_page 500 501 502 503 504 505 /error/50x.html;
|
||||
# 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_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_cache_use_stale error timeout invalid_header updating http_502;
|
||||
proxy_cache_valid any 1d;
|
||||
# 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_ignore_headers Cache-Control Expires Set-Cookie;
|
||||
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_errors off;
|
||||
# Wildcard include
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/conf.d/domains/*.conf;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/conf.d/*.conf;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/conf.d/domains/*.conf;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ location /%pma_alias% {
|
||||
|
||||
location ~ ^/%pma_alias%/(.*\.php)$ {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -3,7 +3,7 @@ location /%pga_alias% {
|
||||
|
||||
location ~ ^/%pga_alias%/(.*\.php)$ {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -39,7 +39,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(.*\.php)$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -32,7 +32,7 @@ server {
|
||||
}
|
||||
|
||||
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_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -33,7 +33,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(.*\.php)$ {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -27,7 +27,7 @@ server {
|
||||
}
|
||||
|
||||
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_param SCRIPT_FILENAME $request_filename;
|
||||
|
||||
@@ -42,7 +42,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -33,7 +33,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -40,7 +40,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -31,7 +31,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
@@ -70,7 +70,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
|
||||
include /etc/nginx/fastcgi_params;
|
||||
include /usr/local/hestia/nginx-system/etc/nginx/fastcgi_params;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
|
||||
|
||||
@@ -61,7 +61,7 @@ server {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
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_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user