Compare commits

...

21 Commits

Author SHA1 Message Date
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
Alexey Berezhok
5610859f17 Disable of MSVSphere build because of MSVSphere doesn.t exists anymore 2026-01-16 11:24:21 +03:00
Alexey Berezhok
598c9abdfb Added remit to local php script 2026-01-16 10:58:18 +03:00
Alexey Berezhok
5d461cc39b Fixed installation error for local php 2026-01-15 23:20:18 +03:00
Alexey Berezhok
8b2c076e2e Added php versions to upgrade.conf, fixed errors 2025-11-18 23:14:29 +03:00
Alexey Berezhok
f44fe71c28 Added php versions to upgrade.conf 2025-11-18 22:50:59 +03:00
Alexey Berezhok
7e9f0f1074 Merge branch 'devel' of ssh://dev.brepo.ru:9453/bayrepo/hestiacp into devel 2025-11-18 22:40:27 +03:00
Alexey Berezhok
be9c2de988 Fixed remi php version 2025-11-18 22:40:01 +03:00
Alexey Berezhok
f433895670 Update spec 2025-11-18 21:56:33 +03:00
Alexey Berezhok
e2c8835b6b Added php 8.4, 8.5 2025-11-17 23:56:25 +03:00
Alexey Berezhok
751814c48a Add fixes of installation 2025-11-17 23:50:57 +03:00
Alexey Berezhok
113cd37b9d Added php 8.4 and 8.5 2025-11-17 23:38:17 +03:00
41 changed files with 1113 additions and 213 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

@@ -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//")
@@ -130,10 +130,10 @@ echo
if [ "$LOCAL_PHP" == "yes" ]; then if [ "$LOCAL_PHP" == "yes" ]; then
for mod in $php_modules_install; do for mod in $php_modules_install; do
enable_local_php_extension "$version" "$mod" fn_enable_local_php_extension "$version" "$mod"
done done
for mod in $php_modules_disable; do for mod in $php_modules_disable; do
disable_local_php_extension "$version" "$mod" fn_disable_local_php_extension "$version" "$mod"
done done
fi fi
@@ -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

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

@@ -22,6 +22,7 @@ export const webDomains = [
{ text: 'PHP 8.2' }, { text: 'PHP 8.2' },
{ text: 'PHP 8.3' }, { text: 'PHP 8.3' },
{ text: 'PHP 8.4' }, { text: 'PHP 8.4' },
{ text: 'PHP 8.5' },
], ],
}, },
]; ];

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

@@ -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" \
@@ -419,11 +419,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
} }

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

@@ -42,7 +42,7 @@ HESTIA_INSTALL_VER='1.9.6.rpm-alpha'
# Dependencies # Dependencies
mariadb_v="10.11" mariadb_v="10.11"
multiphp_v=("74" "80" "81" "82" "83") multiphp_v=("74" "80" "81" "82" "83" "84" "85")
# default PHP version # default PHP version
php_v="82" php_v="82"
@@ -61,7 +61,7 @@ software="nginx
hestia hestia-nginx hestia-php hestia hestia-nginx hestia-php
rrdtool quota e2fsprogs fail2ban dnsutils util-linux cronie expect perl-Mail-DKIM unrar vim acl sysstat rrdtool quota e2fsprogs fail2ban dnsutils util-linux cronie expect perl-Mail-DKIM unrar vim acl sysstat
rsyslog openssh-clients util-linux ipset zstd systemd-timesyncd jq awstats perl-Switch net-tools mc flex rsyslog openssh-clients util-linux ipset zstd systemd-timesyncd jq awstats perl-Switch net-tools mc flex
whois git idn2 unzip zip sudo bc ftp lsof" whois git idn2 unzip zip sudo bc ftp lsof unzip"
installer_dependencies="gnupg2 policycoreutils wget ca-certificates" installer_dependencies="gnupg2 policycoreutils wget ca-certificates"
@@ -753,7 +753,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"
@@ -911,7 +911,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 +956,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 +974,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
@@ -1456,11 +1456,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 +1495,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
@@ -1499,6 +1524,10 @@ fi
# Configure PHP-FPM # # Configure PHP-FPM #
#----------------------------------------------------------# #----------------------------------------------------------#
if [ "$uselocalphp" == "no" ]; then
multiphp_v=("74" "80" "81" "82" "83" "84")
fi
if [ "$phpfpm" = "yes" ]; then if [ "$phpfpm" = "yes" ]; then
if [ "$multiphp" = 'yes' ]; then if [ "$multiphp" = 'yes' ]; then
for v in "${multiphp_v[@]}"; do for v in "${multiphp_v[@]}"; do
@@ -1669,7 +1698,7 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
wget --quiet --retry-connrefused https://data.brepo.ru/hestiacp/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.zip wget --quiet --retry-connrefused https://data.brepo.ru/hestiacp/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.zip
# Unpack files # Unpack files
tar xzf phpMyAdmin-$pma_v-all-languages.tar.gz unzip phpMyAdmin-$pma_v-all-languages.zip
# Create folders # Create folders
mkdir -p /usr/share/phpmyadmin mkdir -p /usr/share/phpmyadmin

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

@@ -18,6 +18,13 @@
CustomLog /var/log/%web_system%/domains/%domain%.log combined CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Directory %sdocroot%> <Directory %sdocroot%>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
Require all denied
</FilesMatch>
AllowOverride All AllowOverride All
SSLRequireSSL SSLRequireSSL
Options +Includes -Indexes +ExecCGI Options +Includes -Indexes +ExecCGI

View File

@@ -21,6 +21,13 @@
IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf* IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf*
<Directory %docroot%> <Directory %docroot%>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
Require all denied
</FilesMatch>
AllowOverride All AllowOverride All
Options +Includes -Indexes +ExecCGI Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir %docroot%:%home%/%user%/tmp php_admin_value open_basedir %docroot%:%home%/%user%/tmp

View File

@@ -0,0 +1,41 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
<VirtualHost %ip%:%web_ssl_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %sdocroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Location />
Require all denied
</Location>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile %ssl_crt%
SSLCertificateKeyFile %ssl_key%
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups apache
</IfModule>
<IfModule mpm_itk.c>
AssignUserID %user% %group%
</IfModule>
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc
</VirtualHost>

View File

@@ -0,0 +1,38 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
<VirtualHost %ip%:%web_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %docroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf*
<Location />
Require all denied
</Location>
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups apache
</IfModule>
<IfModule mpm_itk.c>
AssignUserID %user% %group%
</IfModule>
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc
</VirtualHost>

View File

@@ -18,6 +18,13 @@
CustomLog /var/log/%web_system%/domains/%domain%.log combined CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Directory %sdocroot%> <Directory %sdocroot%>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
Require all denied
</FilesMatch>
AllowOverride All AllowOverride All
SSLRequireSSL SSLRequireSSL
Options +Includes -Indexes +ExecCGI Options +Includes -Indexes +ExecCGI

View File

@@ -21,6 +21,13 @@
IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf* IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf*
<Directory %docroot%> <Directory %docroot%>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
Require all denied
</FilesMatch>
AllowOverride All AllowOverride All
Options +Includes -Indexes +ExecCGI Options +Includes -Indexes +ExecCGI
php_admin_value upload_max_filesize 10M php_admin_value upload_max_filesize 10M

View File

@@ -0,0 +1,32 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
<VirtualHost %ip%:%web_ssl_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %sdocroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Location />
Require all denied
</Location>
SSLEngine on
SSLVerifyClient none
SSLCertificateFile %ssl_crt%
SSLCertificateKeyFile %ssl_key%
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc
</VirtualHost>

View File

@@ -0,0 +1,30 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
<VirtualHost %ip%:%web_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %docroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
IncludeOptional %home%/%user%/conf/web/%domain%/apache2.forcessl.conf*
<Location />
Require all denied
</Location>
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc
</VirtualHost>

View File

@@ -1,16 +1,26 @@
#!/bin/bash #!/usr/bin/bash
# Adding php wrapper # Adding php wrapper
user="$1" user="$1"
domain="$2" domain="$2"
ip="$3" ip="$3"
home_dir="$4" home_dir="$4"
docroot="$5" docroot="$5"
php_path="$6"
wrapper_script='#!/usr/bin/php-cgi -cphp5-cgi.ini' wrapper_script="#!$php_path -cphp5-cgi.ini"
wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php" wrapper_file="$home_dir/$user/web/$domain/cgi-bin/php"
wrapper_dir="/var/www/$user/$domain/cgi-bin"
wrapper_file2="$wrapper_dir/php"
echo "$wrapper_script" > $wrapper_file echo "$wrapper_script" > $wrapper_file
chown $user:$user $wrapper_file chown $user:$user $wrapper_file
chmod -f 751 $wrapper_file chmod -f 751 $wrapper_file
mkdir -p $wrapper_dir
echo "$wrapper_script" > $wrapper_file2
chown $user:$user $wrapper_file2
chown $user:$user $wrapper_dir
chmod -f 751 $wrapper_file2
exit 0 exit 0

View File

@@ -10,7 +10,8 @@
%alias_string% %alias_string%
ServerAdmin %email% ServerAdmin %email%
DocumentRoot %sdocroot% DocumentRoot %sdocroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ #ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
ScriptAlias /cgi-bin/ /var/www/%user%/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/ Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/ Alias /error/ %home%/%user%/web/%domain%/document_errors/
SuexecUserGroup %user% %group% SuexecUserGroup %user% %group%

View File

@@ -10,7 +10,8 @@
%alias_string% %alias_string%
ServerAdmin %email% ServerAdmin %email%
DocumentRoot %docroot% DocumentRoot %docroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ #ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
ScriptAlias /cgi-bin/ /var/www/%user%/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/ Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/ Alias /error/ %home%/%user%/web/%domain%/document_errors/
SuexecUserGroup %user% %group% SuexecUserGroup %user% %group%

View File

@@ -1,22 +1,32 @@
#!/bin/bash #!/usr/bin/bash
# Adding php wrapper # Adding php wrapper
user="$1" user="$1"
domain="$2" domain="$2"
ip="$3" ip="$3"
home_dir="$4" home_dir="$4"
docroot="$5" docroot="$5"
php_path="$6"
wrapper_script="#!/bin/sh wrapper_script="#!/bin/sh
PHPRC=/usr/local/lib PHPRC=/usr/local/lib
export PHPRC export PHPRC
export PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_MAX_REQUESTS=1000
export PHP_FCGI_CHILDREN=20 export PHP_FCGI_CHILDREN=20
exec /usr/bin/php-cgi exec $php_path
" "
wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter" wrapper_file="$home_dir/$user/web/$domain/cgi-bin/fcgi-starter"
wrapper_dir="/var/www/$user/$domain/cgi-bin"
wrapper_file2="$wrapper_dir/fcgi-starter"
echo "$wrapper_script" > $wrapper_file echo "$wrapper_script" > $wrapper_file
chown $user:$user $wrapper_file chown $user:$user $wrapper_file
chmod -f 751 $wrapper_file chmod -f 751 $wrapper_file
mkdir -p $wrapper_dir
echo "$wrapper_script" > $wrapper_file2
chown $user:$user $wrapper_file2
chown $user:$user $wrapper_dir
chmod -f 751 $wrapper_file2
exit 0 exit 0

View File

@@ -28,7 +28,8 @@
<Files *.php> <Files *.php>
SetHandler fcgid-script SetHandler fcgid-script
</Files> </Files>
FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php #FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
FCGIWrapper /var/www/%user%/%domain%/cgi-bin/fcgi-starter .php
</Directory> </Directory>
<Directory %home%/%user%/web/%domain%/stats> <Directory %home%/%user%/web/%domain%/stats>
AllowOverride All AllowOverride All
@@ -42,4 +43,5 @@
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_* IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc IncludeOptional /etc/httpd/conf.h.d/*.inc
</VirtualHost> </VirtualHost>

View File

@@ -30,11 +30,13 @@
<Files *.php> <Files *.php>
SetHandler fcgid-script SetHandler fcgid-script
</Files> </Files>
FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php #FCGIWrapper %home%/%user%/web/%domain%/cgi-bin/fcgi-starter .php
FCGIWrapper /var/www/%user%/%domain%/cgi-bin/fcgi-starter .php
</Directory> </Directory>
<Directory %home%/%user%/web/%domain%/stats> <Directory %home%/%user%/web/%domain%/stats>
AllowOverride All AllowOverride All
</Directory> </Directory>
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_* IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*
IncludeOptional /etc/httpd/conf.h.d/*.inc IncludeOptional /etc/httpd/conf.h.d/*.inc
</VirtualHost> </VirtualHost>

View File

@@ -19,6 +19,13 @@
CustomLog /var/log/%web_system%/domains/%domain%.log combined CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Directory %sdocroot%> <Directory %sdocroot%>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
Require all denied
</FilesMatch>
AllowOverride All AllowOverride All
SSLRequireSSL SSLRequireSSL
Options +Includes -Indexes +ExecCGI Options +Includes -Indexes +ExecCGI

View File

@@ -22,6 +22,13 @@
IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf* IncludeOptional %home%/%user%/conf/web/%domain%/forcessl.apache2.conf*
<Directory %docroot%> <Directory %docroot%>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
Require all denied
</FilesMatch>
AllowOverride All AllowOverride All
Options +Includes -Indexes +ExecCGI Options +Includes -Indexes +ExecCGI
php_admin_value open_basedir %docroot%:%home%/%user%/tmp php_admin_value open_basedir %docroot%:%home%/%user%/tmp

View File

@@ -0,0 +1,66 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
server {
listen %ip%:%proxy_ssl_port% ssl;
server_name %domain_idn% %alias_idn%;
root %sdocroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
ssl_stapling on;
ssl_stapling_verify on;
# TLS 1.3 0-RTT anti-replay
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
if ($anti_replay = 425) { return 425; }
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
HtaccessEnable on;
location ~ /\.(?!well-known\/) {
deny all;
return 404;
}
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js|txt)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
location / {
RewriteEngine On;
location ~ [^/]\.php(/|$) {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass %backend_lsnr%;
}
}
location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/web/%domain%/stats/auth.conf*;
}
proxy_hide_header Upgrade;
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
}

View File

@@ -0,0 +1,53 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
HtaccessEnable on;
location ~ /\.(?!well-known\/) {
deny all;
return 404;
}
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js|txt)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
location / {
RewriteEngine On;
location ~ [^/]\.php(/|$) {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass %backend_lsnr%;
}
}
location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/web/%domain%/stats/auth.conf*;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
}

View File

@@ -0,0 +1,64 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
server {
listen %ip%:%proxy_ssl_port% ssl;
server_name %domain_idn% %alias_idn%;
root %sdocroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
ssl_stapling on;
ssl_stapling_verify on;
# TLS 1.3 0-RTT anti-replay
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
if ($anti_replay = 425) { return 425; }
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
location ~ /\.(?!well-known\/) {
deny all;
return 404;
}
location / {
try_files $uri $uri/ /index.php?$args;
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
location ~ [^/]\.php(/|$) {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass %backend_lsnr%;
}
}
location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/web/%domain%/stats/auth.conf*;
}
proxy_hide_header Upgrade;
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
}

View File

@@ -0,0 +1,51 @@
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://hestiacp.com/docs/server-administration/web-templates.html #
#=========================================================================#
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
location ~ /\.(?!well-known\/) {
deny all;
return 404;
}
location / {
try_files $uri $uri/ /index.php?$args;
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
location ~ [^/]\.php(/|$) {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass %backend_lsnr%;
}
}
location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/web/%domain%/stats/auth.conf*;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
}

View File

@@ -35,7 +35,7 @@ UPGRADE_RESTART_SERVICES='true'
####################################################################################### #######################################################################################
# Supported PHP versions # Supported PHP versions
multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2", "8.3") multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3" "8.4" "8.5")
####################################################################################### #######################################################################################
####### 3rd Party Software Updates ####### ####### 3rd Party Software Updates #######

View File

@@ -0,0 +1,169 @@
#!/opt/brepo/ruby33/bin/ruby
require 'json'
# Файл конфигурации Hestia
config_file = '/usr/local/hestia/conf/hestia.conf'
# Проверяем наличие строки LOCAL_PHP и её значение. Если она отсутствует или не равна 'yes', добавляем или заменяем её.
def ensure_local_php_enabled(config_file)
if File.exist?(config_file)
lines = File.readlines(config_file)
found = false
# Обрабатываем каждую строку
new_lines = lines.map do |line|
if line.strip.start_with?("LOCAL_PHP=")
found = true
"LOCAL_PHP='yes'"
else
line
end
end
# Если строки LOCAL_PHP не было найдено, добавляем её в конец файла
unless found
new_lines << "LOCAL_PHP='yes'\n"
end
# Записываем изменения обратно в файл
File.open(config_file, 'w') do |file|
file.puts new_lines
end
else
# Если файла не существует, создаём его и добавляем строку LOCAL_PHP='yes'
File.write(config_file, "LOCAL_PHP='yes'\n")
end
end
# Вызываем утилиту и разбираем JSON-ответ для получения списка установленных версий PHP
def get_installed_php_versions
output = `v-list-web-templates-backend json`
json_data = JSON.parse(output)
json_data.select { |version| version.start_with?("PHP-") }
end
# Вызываем утилиту и разбираем JSON-ответ для получения списка пользователей
def get_hestia_users
output = `v-list-users json`
json_data = JSON.parse(output)
json_data.keys # Возвращаем только ключи (имена пользователей)
end
# Вызываем утилиту и разбираем JSON-ответ для получения списка доменов пользователя
def get_user_domains(user)
output = `v-list-web-domains #{user} json`
json_data = JSON.parse(output)
json_data # Возвращаем весь хэш с доменами
end
# Функция для получения корректной версии PHP
def get_correct_php_version(system_php_version)
if system_php_version.length < 2
"8.2"
else
"#{system_php_version[0]}.#{system_php_version[1]}"
end
end
# Основная часть программы
begin
system_php_version = `php -r "echo str_replace('.', '', substr(phpversion(), 0, 3));"`
ensure_local_php_enabled(config_file)
INSTALLED_PHP_LIST = get_installed_php_versions
puts "Установленные версии PHP: #{INSTALLED_PHP_LIST.join(', ')}"
# Обрабатываем каждый элемент массива INSTALLED_PHP_LIST
INSTALLED_PHP_LIST.each do |php_version|
# Удаляем префикс 'PHP-' и остаёмся только с цифрами
version_number = php_version.gsub(/^PHP-/, '')
# Вызываем команду v-add-web-php с номером версии PHP
puts "Выполняем команду: v-add-web-php #{version_number}"
system("v-add-web-php", version_number)
end
# Получаем список пользователей Hestia
HESTIA_USERS_LIST = get_hestia_users
puts "Список пользователей Hestia: #{HESTIA_USERS_LIST.join(', ')}"
# Для каждого пользователя из списка выполняем действия с доменами
HESTIA_USERS_LIST.each do |user|
puts "Обрабатываем пользователя: #{user}"
# Получаем список доменов для текущего пользователя
user_domains = get_user_domains(user)
# Обрабатываем каждый домен и изменяем шаблон бэкенда
user_domains.each do |domain, details|
current_domain = domain
current_backend = details['BACKEND']
puts "Обрабатываем домен: #{current_domain}, текущий бэкенд: #{current_backend}"
# Вызываем команду для изменения шаблона бэкенда
command = ["v-change-web-domain-backend-tpl", user, current_domain, current_backend]
puts "Выполняем команду: #{command.join(' ')}"
system(*command)
end
end
# Перенастраиваем alternatives для новго PHP
correct_php_version = get_correct_php_version(system_php_version)
puts "Перенастраиваем PHP на новый путь командой: v-change-sys-php #{correct_php_version}"
system("v-change-sys-php", system_php_version)
# Список регулярных выражений для поиска пакетов, которые нужно удалить
patterns_to_remove = [
/^php\d{2}-runtime-.*$/,
/^php\d{2}-php/
]
# Получаем список установленных пакетов на системе
installed_packages = `yum list installed | grep remi`.split("\n").map { |line| line.split.first }
# Фильтруем подходящие пакеты для удаления
packages_to_remove = []
patterns_to_remove.each do |pattern|
installed_packages.each do |package|
if package.match?(pattern)
packages_to_remove << package
end
end
end
if packages_to_remove.empty?
puts "Нет подходящих пакетов для удаления."
else
puts "Следующие пакеты будут удалены:"
packages_to_remove.each_with_index { |package, index| puts "#{index + 1}. #{package}" }
print "\nВы уверены, что хотите удалить эти пакеты? (y/n): "
response = gets.chomp.downcase
if response == 'y'
# Формируем команду для удаления всех пакетов одной командой
remove_command = "yum remove -y #{packages_to_remove.join(' ')}"
system(remove_command)
puts "\nОперация завершена. Пакеты были успешно удалены."
else
puts "\nУдаление отменено пользователем."
end
end
# Перезапустим все PHP-FPM
INSTALLED_PHP_LIST.each do |php_version|
# Удаляем префикс 'PHP-' и остаёмся только с цифрами
version_number = php_version.gsub(/^PHP-/, '')
puts "Выполняем команду: systemctl restart brepo-php-fpm#{version_number}"
system("systemctl", "restart", "brepo-php-fpm#{version_number}")
end
rescue => e
puts "Произошла ошибка: #{e.message}"
end

View File

@@ -335,7 +335,7 @@ if [ "$dontinstalldeps" != 'true' ]; then
echo "Installing dependencies for compilation..." echo "Installing dependencies for compilation..."
dnf install -y -q $SOFTWARE dnf install -y -q $SOFTWARE
mock -r msvsphere+epel-${release}-$BUILD_ARCH --clean mock -r alma+epel-${release}-$BUILD_ARCH --clean
else else
# Set package dependencies for compiling # Set package dependencies for compiling
SOFTWARE='wget tar git curl build-essential libxml2-dev libz-dev libzip-dev libgmp-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config libsqlite3-dev libonig-dev rpm lsb-release' SOFTWARE='wget tar git curl build-essential libxml2-dev libz-dev libzip-dev libgmp-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config libsqlite3-dev libonig-dev rpm lsb-release'
@@ -536,7 +536,7 @@ if [ "$NGINX_B" = true ]; then
# Build the package # Build the package
echo Building Nginx RPM echo Building Nginx RPM
mock -r msvsphere+epel-${release}-$BUILD_ARCH --sources $BUILD_DIR --spec $BUILD_DIR/hestia-nginx.spec --resultdir $RPM_DIR mock -r alma+epel-${release}-$BUILD_ARCH --sources $BUILD_DIR --spec $BUILD_DIR/hestia-nginx.spec --resultdir $RPM_DIR
rm -f $BUILD_DIR/* rm -f $BUILD_DIR/*
fi fi
fi fi
@@ -674,7 +674,7 @@ if [ "$PHP_B" = true ]; then
# Build RPM package # Build RPM package
echo Building PHP RPM echo Building PHP RPM
mock -r msvsphere+epel-${release}-$BUILD_ARCH --sources $BUILD_DIR --spec $BUILD_DIR/hestia-php.spec --resultdir $RPM_DIR mock -r alma+epel-${release}-$BUILD_ARCH --sources $BUILD_DIR --spec $BUILD_DIR/hestia-php.spec --resultdir $RPM_DIR
rm -f $BUILD_DIR/* rm -f $BUILD_DIR/*
fi fi
fi fi
@@ -792,7 +792,7 @@ if [ "$HESTIA_B" = true ]; then
# Build RPM package # Build RPM package
echo Building Hestia RPM echo Building Hestia RPM
mock -r msvsphere+epel-${release}-$BUILD_ARCH --sources $BUILD_DIR --spec $BUILD_DIR/hestia.spec --resultdir $RPM_DIR mock -r alma+epel-${release}-$BUILD_ARCH --sources $BUILD_DIR --spec $BUILD_DIR/hestia.spec --resultdir $RPM_DIR
rm -f $BUILD_DIR/* rm -f $BUILD_DIR/*
fi fi

View File

@@ -3,7 +3,7 @@
Name: hestia Name: hestia
Version: 1.9.6 Version: 1.9.6
Release: 1%{dist} Release: 9%{dist}
Summary: Hestia Control Panel Summary: Hestia Control Panel
Group: System Environment/Base Group: System Environment/Base
License: GPLv3 License: GPLv3
@@ -36,8 +36,7 @@ Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
Requires: ruby Requires: ruby
Requires: puppet Requires: ansible-core
Requires: puppet-stdlib
Provides: hestia = %{version}-%{release} Provides: hestia = %{version}-%{release}
Conflicts: redhat-release < 8 Conflicts: redhat-release < 8
@@ -184,7 +183,24 @@ fi
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
%changelog %changelog
* Thu Oct 09 2025 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-1 * Sun Mar 29 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-9
- Added support ansible instead of puppet
* Fri Mar 27 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-8
- Fixed installation of panel without PHP-FPM
- Fixed mod_php, fcgid, fcgi mode
* Thu Mar 26 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-6
- Fixed database size usage and disk usage output on the info pages
* Thu Mar 19 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-5
- Added nginx with mod_rewrite
- Added templates for nginx mod_rewrite activation
* Thu Jan 15 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-3
- Fix error on local php installation and extension activation
* Thu Oct 09 2025 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-2
- Fix error on all web and mail domains after Apache 2.4.64 update - Fix error on all web and mail domains after Apache 2.4.64 update
* Thu Jun 05 2025 Alexey Berezhok <a@bayrepo.ru> - 1.9.5-4 * Thu Jun 05 2025 Alexey Berezhok <a@bayrepo.ru> - 1.9.5-4

View File

@@ -39,6 +39,8 @@ $v_php_versions = [
"php-81", "php-81",
"php-82", "php-82",
"php-83", "php-83",
"php-84",
"php-85",
]; ];

View File

@@ -4,13 +4,17 @@ $TAB = "DB";
// Main include // Main include
include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
//Update data before $output
exec(HESTIA_CMD . "v-update-databases-disk $user", $output, $return_var);
unset($output);
// Data // Data
exec(HESTIA_CMD . "v-list-databases $user json", $output, $return_var); exec(HESTIA_CMD . "v-list-databases $user json", $output, $return_var);
$data = json_decode(implode("", $output), true); $data = json_decode(implode("", $output), true);
if ($_SESSION["userSortOrder"] == "name") { if ($_SESSION["userSortOrder"] == "name") {
ksort($data); ksort($data);
} else { } else {
$data = array_reverse($data, true); $data = array_reverse($data, true);
} }
unset($output); unset($output);

View File

@@ -4,13 +4,25 @@ $TAB = "WEB";
// Main include // Main include
include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
//Update data before output
exec(HESTIA_CMD . "v-update-web-domains-disk " . $user, $output, $return_var);
unset($output);
exec(HESTIA_CMD . "v-update-web-domains-stat " . $user, $output, $return_var);
unset($output);
exec(HESTIA_CMD . "v-update-web-domains-traff " . $user, $output, $return_var);
unset($output);
// Data // Data
exec(HESTIA_CMD . "v-list-web-domains " . $user . " 'json'", $output, $return_var); exec(
HESTIA_CMD . "v-list-web-domains " . $user . " 'json'",
$output,
$return_var,
);
$data = json_decode(implode("", $output), true); $data = json_decode(implode("", $output), true);
if ($_SESSION["userSortOrder"] == "name") { if ($_SESSION["userSortOrder"] == "name") {
ksort($data); ksort($data);
} else { } else {
$data = array_reverse($data, true); $data = array_reverse($data, true);
} }
$ips = json_decode(shell_exec(HESTIA_CMD . "v-list-sys-ips json"), true); $ips = json_decode(shell_exec(HESTIA_CMD . "v-list-sys-ips json"), true);