12 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
alexey
aae561716c Fixes remi instllation 2026-03-28 18:31:39 +03:00
alexey
8a2ec261f5 Added fixes for non php-fpm installation 2026-03-28 01:29:23 +03:00
alexey
ec4bb73609 Fixed database size usage and disk usage output on the info pages 2026-03-26 22:52:45 +03:00
alexey
e37e8a0d1e Fixed nginx mod_rewrite templates 2026-03-21 23:17:24 +03:00
alexey
f398decba9 Added nginx+mod_rewrite support 2026-03-19 22:46:46 +03:00
Alexey Berezhok
ae8b90d66e Rename default rpm repository 2026-01-16 12:33:14 +03:00
193 changed files with 1280 additions and 460 deletions

View File

@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [1.9.6.rpm] - Release
- Fix error on all web and mail domains after Apache 2.4.64 update
- Fix error on local php installation and extension activation
- Added templates for nginx mod_rewrite activation
- Added nginx with mod_rewrite
- Fixed database size usage and disk usage output on the info pages
- Fixed installation of panel without PHP-FPM
- Fixed mod_php, fcgid, fcgi mode
## [1.9.5.rpm] - Release ## [1.9.5.rpm] - Release
- Added support installation of alternative php not only remi - Added support installation of alternative php not only remi

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

@@ -84,10 +84,10 @@ if [ "$LOCAL_PHP" == "yes" ]; then
fi fi
else else
# Packages in Remi repo have names with php$version-php- prefixes # Packages in Remi repo have names with php$version-php- prefixes
mph="php$version-php-fpm php$version-php-cgi php$version-php-mysqlnd php$version-php-pgsql mph="php$version-php-fpm php$version-php-cgi php$version-php-mysqlnd php$version-php-pgsql
php$version-php-pdo php$version-php-common php$version-php-pecl-imagick php$version-php-imap php$version-php-pdo php$version-php-common php$version-php-pecl-imagick php$version-php-imap
php$version-php-ldap php$version-php-pecl-apcu php$version-php-pecl-zip php$version-php-cli php$version-php-ldap php$version-php-pecl-apcu php$version-php-pecl-zip php$version-php-cli
php$version-php-opcache php$version-php-xml php$version-php-gd php$version-php-intl php$version-php-opcache php$version-php-xml php$version-php-gd php$version-php-intl
php$version-php-mbstring php$version-php-pspell php$version-php-readline" php$version-php-mbstring php$version-php-pspell php$version-php-readline"
if [ "$version" = "56" ]; then if [ "$version" = "56" ]; then
mph=$(sed -e "s/php$version-php-pecl-apcu//") mph=$(sed -e "s/php$version-php-pecl-apcu//")
@@ -156,23 +156,15 @@ 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
fi
if ! httpd -M | grep 'setenvif_module' ; then
sed 's/#LoadModule setenvif_module/LoadModule setenvif_module/' -i /etc/httpd/conf.modules.d/00-base.conf
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 fi
if ! httpd -M | grep 'setenvif_module' ; then
sed 's/#LoadModule setenvif_module/LoadModule setenvif_module/' -i /etc/httpd/conf.modules.d/00-base.conf
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,18 +65,18 @@ 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' ;;
exim4) dst='/etc/exim4/exim4.conf.template' ;; exim4) dst='/etc/exim4/exim4.conf.template' ;;
vsftpd) dst=$(find /etc/vsftpd* -name 'vsftpd.conf') ;; vsftpd) dst=$(find /etc/vsftpd* -name 'vsftpd.conf') ;;
proftpd) dst=$(find /etc/proftpd* -name 'proftpd.conf') ;; proftpd) dst=$(find /etc/proftpd* -name 'proftpd.conf') ;;
php) php)
if [ "$LOCAL_PHP" == "yes" ]; then if [ "$LOCAL_PHP" == "yes" ]; then
dst=$(find /opt/brepo/php${php_v} -name php.ini) dst=$(find /opt/brepo/php${php_v} -name php.ini)
else else
dst=$(find /etc/opt/remi/php${php_v} -name php.ini) dst=$(find /etc/opt/remi/php${php_v} -name php.ini)
fi fi
;; ;;
mysql) dst=$(find /etc/my* -name my.cnf) ;; mysql) dst=$(find /etc/my* -name my.cnf) ;;

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,10 +25,14 @@ 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
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 fi
cat "$tmpfile" | $SENDMAIL -s "$subj" "$email" cat "$tmpfile" | $SENDMAIL -s "$subj" "$email"
if [ "$DEBUG_MODE" = "true" ]; then if [ "$DEBUG_MODE" = "true" ]; then

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,10 +86,19 @@ for service in $service_list; do
"$service" = "proftpd" -o \ "$service" = "proftpd" -o \
"$service" = "ssh" -o \ "$service" = "ssh" -o \
"$service" = "fail2ban" ]; then "$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 else
systemctl reset-failed "$service" >> $log 2>&1 if [ "$service" = "nginx" ]; then
systemctl restart "$service" >> $log 2>&1 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 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.

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
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 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
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 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

@@ -1,158 +1,224 @@
import { defineConfig } from 'vitepress'; import { defineConfig } from "vitepress";
import { version } from '../../package.json'; import { version } from "../../package.json";
export default defineConfig({ export default defineConfig({
lang: 'en-US', lang: "en-US",
title: 'Hestia Control Panel', title: "Hestia Control Panel",
description: 'Open-source web server control panel.', description: "Open-source web server control panel.",
lastUpdated: true, lastUpdated: true,
cleanUrls: false, cleanUrls: false,
head: [ head: [
['link', { rel: 'icon', sizes: 'any', href: '/favicon.ico' }], ["link", { rel: "icon", sizes: "any", href: "/favicon.ico" }],
['link', { rel: 'icon', type: 'image/svg+xml', sizes: '16x16', href: '/logo.svg' }], [
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }], "link",
['link', { rel: 'manifest', href: '/site.webmanifest' }], { rel: "icon", type: "image/svg+xml", sizes: "16x16", href: "/logo.svg" },
['meta', { name: 'theme-color', content: '#b7236a' }], ],
], [
"link",
{
rel: "apple-touch-icon",
sizes: "180x180",
href: "/apple-touch-icon.png",
},
],
["link", { rel: "manifest", href: "/site.webmanifest" }],
["meta", { name: "theme-color", content: "#b7236a" }],
],
themeConfig: { themeConfig: {
logo: '/logo.svg', logo: "/logo.svg",
nav: nav(), nav: nav(),
socialLinks: [ socialLinks: [
{ icon: 'github', link: 'https://dev.brepo.ru/bayrepo/hestiacp' }, { icon: "github", link: "https://dev.brepo.ru/bayrepo/hestiacp" },
{ icon: 'github', link: 'https://github.com/bayrepo/hestiacp-rpm' }, { icon: "github", link: "https://github.com/bayrepo/hestiacp-rpm" },
{ icon: 'github', link: 'https://github.com/hestiacp/hestiacp' }, { icon: "github", link: "https://github.com/hestiacp/hestiacp" },
], ],
sidebar: { '/docs/': sidebarDocs() }, sidebar: { "/docs/": sidebarDocs() },
outline: [2, 3], outline: [2, 3],
footer: { footer: {
message: 'Выпущена под лицензией GPLv3.', message: "Выпущена под лицензией GPLv3.",
copyright: 'Copyright © 2019-present Hestia Control Panel и некоторые RPM based компоненты принадлежат bayrepo', copyright:
}, "Copyright © 2019-present Hestia Control Panel и некоторые RPM based компоненты принадлежат bayrepo",
},
}, },
}); });
/** @returns {import("vitepress").DefaultTheme.NavItem[]} */ /** @returns {import("vitepress").DefaultTheme.NavItem[]} */
function nav() { function nav() {
return [ return [
{ text: 'Характеристики', link: '/features.md' }, { text: "Характеристики", link: "/features.md" },
{ text: 'Установка', link: '/install.md' }, { text: "Установка", link: "/install.md" },
{ text: 'Документация', link: '/docs/introduction/getting-started.md', activeMatch: '/docs/' }, {
{ text: "Документация",
text: `v${version}`, link: "/docs/introduction/getting-started.md",
items: [ activeMatch: "/docs/",
{ },
text: 'Changelog', {
link: 'https://dev.brepo.ru/bayrepo/hestiacp/src/branch/master/CHANGELOG.md', text: `v${version}`,
}, items: [
{ {
text: 'Содействие в разработке', text: "Changelog",
link: 'https://dev.brepo.ru/bayrepo/hestiacp/src/branch/master/CONTRIBUTING.md', link: "https://dev.brepo.ru/bayrepo/hestiacp/src/branch/master/CHANGELOG.md",
}, },
{ {
text: 'Политика безопасности', text: "Содействие в разработке",
link: 'https://dev.brepo.ru/bayrepo/hestiacp/src/branch/master/SECURITY.md', link: "https://dev.brepo.ru/bayrepo/hestiacp/src/branch/master/CONTRIBUTING.md",
}, },
], {
}, text: "Политика безопасности",
]; link: "https://dev.brepo.ru/bayrepo/hestiacp/src/branch/master/SECURITY.md",
},
],
},
];
} }
/** @returns {import("vitepress").DefaultTheme.SidebarItem[]} */ /** @returns {import("vitepress").DefaultTheme.SidebarItem[]} */
function sidebarDocs() { function sidebarDocs() {
return [ return [
{ {
text: 'Знакомство', text: "Знакомство",
collapsed: false, collapsed: false,
items: [ items: [
{ text: 'С чего начать', link: '/docs/introduction/getting-started.md' }, {
{ text: 'Рекомендации', link: '/docs/introduction/best-practices.md' }, text: "С чего начать",
], link: "/docs/introduction/getting-started.md",
}, },
{ { text: "Рекомендации", link: "/docs/introduction/best-practices.md" },
text: 'Инструкция пользователя', ],
collapsed: false, },
items: [ {
{ text: 'Аккаунт', link: '/docs/user-guide/account.md' }, text: "Инструкция пользователя",
{ text: 'Резервные копии', link: '/docs/user-guide/backups.md' }, collapsed: false,
{ text: 'Cron задачи', link: '/docs/user-guide/cron-jobs.md' }, items: [
{ text: 'Базы данных', link: '/docs/user-guide/databases.md' }, { text: "Аккаунт", link: "/docs/user-guide/account.md" },
{ text: 'DNS', link: '/docs/user-guide/dns.md' }, { text: "Резервные копии", link: "/docs/user-guide/backups.md" },
{ text: 'Менеджер файлов', link: '/docs/user-guide/file-manager.md' }, { text: "Cron задачи", link: "/docs/user-guide/cron-jobs.md" },
{ text: 'Почтовые домены', link: '/docs/user-guide/mail-domains.md' }, { text: "Базы данных", link: "/docs/user-guide/databases.md" },
{ text: 'Оповещения', link: '/docs/user-guide/notifications.md' }, { text: "DNS", link: "/docs/user-guide/dns.md" },
{ text: 'Пакеты', link: '/docs/user-guide/packages.md' }, { text: "Менеджер файлов", link: "/docs/user-guide/file-manager.md" },
{ text: 'Статистика', link: '/docs/user-guide/statistics.md' }, { text: "Почтовые домены", link: "/docs/user-guide/mail-domains.md" },
{ text: 'Пользователи', link: '/docs/user-guide/users.md' }, { text: "Оповещения", link: "/docs/user-guide/notifications.md" },
{ text: 'Веб домены', link: '/docs/user-guide/web-domains.md' }, { text: "Пакеты", link: "/docs/user-guide/packages.md" },
], { text: "Статистика", link: "/docs/user-guide/statistics.md" },
}, { text: "Пользователи", link: "/docs/user-guide/users.md" },
{ { text: "Веб домены", link: "/docs/user-guide/web-domains.md" },
text: 'Администрирование сервера', ],
collapsed: false, },
items: [ {
{ text: 'Создание резервных копий и восстановление', link: '/docs/server-administration/backup-restore.md' }, text: "Администрирование сервера",
{ text: 'Конфигурация', link: '/docs/server-administration/configuration.md' }, collapsed: false,
{ text: 'Персональная настройка', link: '/docs/server-administration/customisation.md' }, items: [
{ text: 'Базы данных и phpMyAdmin', link: '/docs/server-administration/databases.md' }, {
{ text: 'DNS кластера & DNSSEC', link: '/docs/server-administration/dns.md' }, text: "Создание резервных копий и восстановление",
{ text: 'Email', link: '/docs/server-administration/email.md' }, link: "/docs/server-administration/backup-restore.md",
{ text: 'Менеджер файлов', link: '/docs/server-administration/file-manager.md' }, },
{ text: 'Firewall', link: '/docs/server-administration/firewall.md' }, {
{ text: 'Обновления ОС', link: '/docs/server-administration/os-upgrades.md' }, text: "Конфигурация",
{ text: 'Rest API', link: '/docs/server-administration/rest-api.md' }, link: "/docs/server-administration/configuration.md",
{ text: 'SSL сертификаты', link: '/docs/server-administration/ssl-certificates.md' }, },
{ text: 'Веб шаблоны и кэширование', link: '/docs/server-administration/web-templates.md' }, {
{ text: 'Troubleshooting', link: '/docs/server-administration/troubleshooting.md' }, text: "Персональная настройка",
], link: "/docs/server-administration/customisation.md",
}, },
{ {
text: 'Содейтсвие в разработке', text: "Базы данных и phpMyAdmin",
collapsed: false, link: "/docs/server-administration/databases.md",
items: [ },
{ text: 'Сборка пакетов', link: '/docs/contributing/building.md' }, {
{ text: 'Разработка', link: '/docs/contributing/development.md' }, text: "DNS кластера & DNSSEC",
{ text: 'Документация', link: '/docs/contributing/documentation.md' }, link: "/docs/server-administration/dns.md",
{ text: 'Установка приложений', link: '/docs/contributing/quick-install-app.md' }, },
{ text: 'Тестирование', link: '/docs/contributing/testing.md' }, { text: "Email", link: "/docs/server-administration/email.md" },
{ text: 'Переводы', link: '/docs/contributing/translations.md' }, {
], text: "Менеджер файлов",
}, link: "/docs/server-administration/file-manager.md",
{ },
text: 'Сообщество', { text: "Firewall", link: "/docs/server-administration/firewall.md" },
collapsed: false, {
items: [ text: "Обновления ОС",
{ text: 'Hestia Nginx Cache', link: '/docs/community/hestia-nginx-cache.md' }, link: "/docs/server-administration/os-upgrades.md",
{ },
text: 'Ioncube installer for Hestia', { text: "Rest API", link: "/docs/server-administration/rest-api.md" },
link: '/docs/community/ioncube-hestia-installer.md', {
}, text: "SSL сертификаты",
{ text: 'Генератор установочной команды', link: '/docs/community/install-script-generator.md' }, link: "/docs/server-administration/ssl-certificates.md",
], },
}, {
{ text: "Веб шаблоны и кэширование",
text: 'Ссылки', link: "/docs/server-administration/web-templates.md",
collapsed: false, },
items: [ {
{ text: 'API', link: '/docs/reference/api.md' }, text: "Troubleshooting",
{ text: 'CLI', link: '/docs/reference/cli.md' }, link: "/docs/server-administration/troubleshooting.md",
], },
}, ],
{ },
text: 'Дополнения', {
collapsed: false, text: "Содейтсвие в разработке",
items: [ collapsed: false,
{ text: 'PHP cli селектор', link: '/docs/extensions/php-cli-selector.md' }, items: [
{ text: 'Расширенные модули', link: '/docs/extensions/extended-modules.md' }, { text: "Сборка пакетов", link: "/docs/contributing/building.md" },
{ text: 'Настройка Local PHP', link: '/docs/extensions/local-php.md' }, { text: "Разработка", link: "/docs/contributing/development.md" },
], { text: "Документация", link: "/docs/contributing/documentation.md" },
}, {
]; text: "Установка приложений",
link: "/docs/contributing/quick-install-app.md",
},
{ text: "Тестирование", link: "/docs/contributing/testing.md" },
{ text: "Переводы", link: "/docs/contributing/translations.md" },
],
},
{
text: "Сообщество",
collapsed: false,
items: [
{
text: "Hestia Nginx Cache",
link: "/docs/community/hestia-nginx-cache.md",
},
{
text: "Ioncube installer for Hestia",
link: "/docs/community/ioncube-hestia-installer.md",
},
{
text: "Генератор установочной команды",
link: "/docs/community/install-script-generator.md",
},
],
},
{
text: "Ссылки",
collapsed: false,
items: [
{ text: "API", link: "/docs/reference/api.md" },
{ text: "CLI", link: "/docs/reference/cli.md" },
],
},
{
text: "Дополнения",
collapsed: false,
items: [
{
text: "PHP cli селектор",
link: "/docs/extensions/php-cli-selector.md",
},
{
text: "Расширенные модули",
link: "/docs/extensions/extended-modules.md",
},
{ text: "Настройка Local PHP", link: "/docs/extensions/local-php.md" },
{
text: "nginx+mod_rewrite",
link: "/docs/extensions/nginx-mod-rewrite.md",
},
],
},
];
} }

View File

@@ -148,4 +148,4 @@ bundle install
bundle install --path=vendor bundle install --path=vendor
``` ```
для установки пользователю необходимых гемов локально. для установки пользователю необходимых гемов локально.

View File

@@ -0,0 +1,15 @@
# nginx с поддержкой mdo_rewrite
HestiaCP RPM edition поддерживает установку приложений для доменов, таких как Wordpress, Joomla, Drupal и т.д.
Данные приложения написаны на PHP и требуют особого режима доступа к файлам, который реализуется с помощью .htaccess файла, в котором опианы эти правила преобразования URL.
Но .htaccess файл доступен только для Apache, для реализации работоспособнсти приложений в контрольной панели организованы шаблоны конфигурации nginx, которые по сути являются аналогами конфигурации из .htaccess.
Эти шаблоны размещены в каталоге `/usr/local/hestia/data/templates/web/nginx/php-fpm`.
# nginx + mod_rewrite
Но с версии 1.28.2 nginx добавлен экспериментальный модуль mod_rewrite для nginx, который позволяет понимать конфигурации из .htaccess и для nginx.
Для активации данной конфигурации, необходимо в настройках домена в `Расширенных настройках` выбрать в поле `Шаблон прокси` шаблон `nginx-php-rewrite`. Данный шаблон автоматически определит версию PHP-FPM для домена и активирует работу модуля mod_rewrite для nginx. Для данного домена Apache больше не будет принимать участие в обработке запроса, все будет обрабатываться в связке nginx-PHP-FPM.

View File

@@ -61,3 +61,4 @@
- [PHP cli селектор](/docs/extensions/php-cli-selector.md) - [PHP cli селектор](/docs/extensions/php-cli-selector.md)
- [Расширенные модули](/docs/extensions/extended-modules.md) - [Расширенные модули](/docs/extensions/extended-modules.md)
- [Настройка Local PHP](/docs/extensions/local-php.md) - [Настройка Local PHP](/docs/extensions/local-php.md)
- [nginx + mod_rewrite](/docs/extensions/nginx-mod-rewrite.md)

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

@@ -102,7 +102,7 @@ prepare_web_backend() {
# Accept first function argument as backend template otherwise fallback to $template global variable # Accept first function argument as backend template otherwise fallback to $template global variable
local backend_template=${1:-$template} local backend_template=${1:-$template}
php_type=$(cat "$HESTIA/conf/hestia.conf" | grep "LOCAL_PHP" | grep "yes") php_type=$(cat "$HESTIA/conf/hestia.conf" | grep "LOCAL_PHP" | grep "yes")
if [ -n "$php_type" ]; then if [ -n "$php_type" ]; then
pool=$(find -L /opt/brepo/ -name "$domain.conf" -exec dirname {} \; 2>/dev/null) pool=$(find -L /opt/brepo/ -name "$domain.conf" -exec dirname {} \; 2>/dev/null)
else else
@@ -359,7 +359,7 @@ add_web_config() {
-e "s|%ssl_ca%|$ssl_ca|g" \ -e "s|%ssl_ca%|$ssl_ca|g" \
-e "s|%docrtpriv%|$docrtpriv|g" \ -e "s|%docrtpriv%|$docrtpriv|g" \
> $conf > $conf
if [ "$TPLNM" == "srvproxy.tpl" -o "$TPLNM" == "srvproxy.stpl" ];then if [ "$TPLNM" == "srvproxy.tpl" -o "$TPLNM" == "srvproxy.stpl" ];then
proxy_backend_port_internal=$(convert_proxy_ngix_internal_redirect "$3") proxy_backend_port_internal=$(convert_proxy_ngix_internal_redirect "$3")
cat "$conf" \ cat "$conf" \
@@ -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
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 # 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)
@@ -399,8 +403,13 @@ add_web_config() {
fi fi
done done
else else
rm -f /etc/$1/$confd/domains/$domain.conf if [ "$1" = "nginx" ]; then
ln -s $conf /etc/$1/$confd/domains/$domain.conf 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 # 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
@@ -419,11 +428,41 @@ add_web_config() {
done done
fi fi
#----
php_type=$(cat "$HESTIA/conf/hestia.conf" | grep "LOCAL_PHP" | grep "yes")
MOD_CONF="/etc/httpd/conf.modules.d/09-mod-php.conf"
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}')
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
if [ -n "$php_ver" ]; then
if [ -n "$php_type" ]; then
php_cgi_path="/opt/brepo/${php_ver}/bin/php-cgi"
else
php_cgi_path="/opt/remi/${php_ver}/root/bin/php-cgi"
fi
fi
if [[ -x "$php_cgi_path" ]]; then
:
else
php_cgi_path=$PHP_DEFAULT
fi
#----
trigger="${TPLNM/.*pl/.sh}" trigger="${TPLNM/.*pl/.sh}"
if [ -x "${WEBTPL_LOCATION}/$trigger" ]; then if [ -x "${WEBTPL_LOCATION}/$trigger" ]; then
$WEBTPL_LOCATION/$trigger \ $WEBTPL_LOCATION/$trigger \
$user $domain $local_ip $HOMEDIR \ $user $domain $local_ip $HOMEDIR \
$HOMEDIR/$user/web/$domain/public_html $HOMEDIR/$user/web/$domain/public_html \
$php_cgi_path
fi fi
} }
@@ -488,17 +527,29 @@ del_web_config() {
rm -f $legacyconf rm -f $legacyconf
# Remove old global includes file # 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 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
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 fi
if [ -n "$PROXY_SYSTEM" ] && [ "$PROXY_SYSTEM" = "$1" ]; then 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 fi
} }
@@ -887,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
rm -f /etc/$WEB_SYSTEM/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf if [ "$WEB_SYSTEM" = "nginx" ]; then
rm -f /etc/$PROXY_SYSTEM/$pconfd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf 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 # Remove SSL certificates
rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/* rm -f $HOMEDIR/$user/conf/mail/$domain/ssl/*
@@ -976,13 +1035,23 @@ 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"
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf if [ "$1" = "nginx" ]; then
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf 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 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"
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf if [ "$1" = "nginx" ]; then
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.ssl.conf 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 fi
# Add rewrite rules to force HTTPS/SSL connections # Add rewrite rules to force HTTPS/SSL connections
@@ -997,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 {} \; 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
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf if [ "$1" = "nginx" ]; then
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf 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 fi
if [ -n "$PROXY_SYSTEM" ]; then if [ -n "$PROXY_SYSTEM" ]; then
rm -f /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf if [ "$1" = "nginx" ]; then
ln -s $conf /etc/$1/$confd/domains/$WEBMAIL_ALIAS.$domain.conf 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 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 {} \;
@@ -1023,12 +1102,20 @@ 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
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 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
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 fi
} }
@@ -1046,12 +1133,20 @@ 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
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 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
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 fi
} }
@@ -1157,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

@@ -56,11 +56,12 @@ 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'
@@ -753,7 +757,7 @@ if [ "$uselocalphp" == "yes" ]; then
php_pkgs_lst="brepo-php${php_v} brepo-php${php_v}-mod-apache" php_pkgs_lst="brepo-php${php_v} brepo-php${php_v}-mod-apache"
else else
write_config_value "LOCAL_PHP" "no" write_config_value "LOCAL_PHP" "no"
php_pkgs_lst="php${php_v}-php.${arch} php${php_v}-php-cgi.${arch} php${php_v}-php-mysqlnd.${arch} php${php_v}-php-pgsql.${arch} php_pkgs_lst="php${php_v}-php php${php_v}-php-cgi php${php_v}-php-mysqlnd php${php_v}-php-pgsql
php${php_v}-php-pdo php${php_v}-php-common php${php_v}-php-pecl-imagick php${php_v}-php-imap php${php_v}-php-ldap php${php_v}-php-pdo php${php_v}-php-common php${php_v}-php-pecl-imagick php${php_v}-php-imap php${php_v}-php-ldap
php${php_v}-php-pecl-apcu php${php_v}-php-pecl-zip php${php_v}-php-cli php${php_v}-php-opcache php${php_v}-php-xml php${php_v}-php-pecl-apcu php${php_v}-php-pecl-zip php${php_v}-php-cli php${php_v}-php-opcache php${php_v}-php-xml
php${php_v}-php-gd php${php_v}-php-intl php${php_v}-php-mbstring php${php_v}-php-pspell php${php_v}-php-readline" php${php_v}-php-gd php${php_v}-php-intl php${php_v}-php-mbstring php${php_v}-php-pspell php${php_v}-php-readline"
@@ -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"
write_config_value "PROXY_PORT" "80" if [ "$bunkerweb" = 'yes' ]; then
write_config_value "PROXY_SSL_PORT" "443" 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" 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"
write_config_value "WEB_PORT" "80" if [ "$bunkerweb" = 'yes' ]; then
write_config_value "WEB_SSL_PORT" "443" 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 "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"
#----------------------------------------------------------# #----------------------------------------------------------#
@@ -1456,11 +1470,32 @@ if [ "$apache" = 'yes' ]; then
# IDK why those modules still here, but ok. if they are disabled by default # IDK why those modules still here, but ok. if they are disabled by default
if [ -e /etc/httpd/conf.modules.d/01-suexec.conf ]; then if [ "$phpfpm" = 'yes' ]; then
sed 's/^LoadModule suexec_module/#LoadModule suexec_module/' -i /etc/httpd/conf.modules.d/01-suexec.conf if [ -e /etc/httpd/conf.modules.d/01-suexec.conf ]; then
fi sed 's/^LoadModule suexec_module/#LoadModule suexec_module/' -i /etc/httpd/conf.modules.d/01-suexec.conf
if [ -e /etc/httpd/conf.modules.d/10-fcgid.conf ]; then fi
sed 's/^LoadModule fcgid_module/#LoadModule fcgid_module/' -i /etc/httpd/conf.modules.d/10-fcgid.conf if [ -e /etc/httpd/conf.modules.d/10-fcgid.conf ]; then
sed 's/^LoadModule fcgid_module/#LoadModule fcgid_module/' -i /etc/httpd/conf.modules.d/10-fcgid.conf
fi
else
cp -f $HESTIA_INSTALL_DIR/httpd/01-mpm-itk.conf /etc/httpd/conf.modules.d/
if [ -e /etc/httpd/conf.modules.d/01-suexec.conf ]; then
sed 's/#LoadModule suexec_module/LoadModule suexec_module/' -i /etc/httpd/conf.modules.d/01-suexec.conf
fi
echo "LoadModule suphp_module modules/mod_suphp.so" > /etc/httpd/conf.modules.d/10-suphp.conf
if [ -e /etc/httpd/conf.modules.d/10-fcgid.conf ]; then
sed 's/#LoadModule fcgid_module/LoadModule fcgid_module/' -i /etc/httpd/conf.modules.d/10-fcgid.conf
fi
if [ -e /etc/httpd/conf.d/fcgid.conf ]; then
cp /etc/httpd/conf.d/fcgid.conf /etc/httpd/conf.h.d/fcgid.conf
fi
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
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
fi
fi fi
# Switch status loader to custom one # Switch status loader to custom one
@@ -1474,6 +1509,10 @@ if [ "$apache" = 'yes' ]; then
sed 's/LoadModule mpm_prefork_module/#LoadModule mpm_prefork_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf sed 's/LoadModule mpm_prefork_module/#LoadModule mpm_prefork_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
sed 's/#LoadModule mpm_event_module/LoadModule mpm_event_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf sed 's/#LoadModule mpm_event_module/LoadModule mpm_event_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
cp -f $HESTIA_INSTALL_DIR/httpd/hestia-event.conf /etc/httpd/conf.h.d/ cp -f $HESTIA_INSTALL_DIR/httpd/hestia-event.conf /etc/httpd/conf.h.d/
else
sed 's/LoadModule mpm_worker_module/#LoadModule mpm_worker_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
sed 's/LoadModule mpm_event_module/#LoadModule mpm_event_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
sed 's/#LoadModule mpm_prefork_module/LoadModule mpm_prefork_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
fi fi
if [ ! -d /etc/httpd/sites-available ]; then if [ ! -d /etc/httpd/sites-available ]; then

View File

@@ -1,5 +1,5 @@
[hectiacp] [hectiacp]
name=msvsphere9 hestia repo on repo.brepo.ru name=RPM Alma Rocky 9 hestia repo on repo.brepo.ru
baseurl=https://repo.brepo.ru/hestia/ baseurl=https://repo.brepo.ru/hestia/
enabled=1 enabled=1
gpgkey=https://repo.brepo.ru/hestia/brepo_projects-gpg-key gpgkey=https://repo.brepo.ru/hestia/brepo_projects-gpg-key

View File

@@ -0,0 +1,3 @@
<IfModule mpm_prefork_module>
LoadModule mpm_itk_module modules/mod_mpm_itk.so
</IfModule>

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;

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