Added nginx+mod_rewrite support
This commit is contained in:
@@ -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",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
15
docs/docs/extensions/nginx-mod-rewrite.md
Normal file
15
docs/docs/extensions/nginx-mod-rewrite.md
Normal 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.
|
||||||
@@ -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)
|
||||||
|
|||||||
67
install/rpm/templates/web/nginx/nginx-php-rewrite.stpl
Executable file
67
install/rpm/templates/web/nginx/nginx-php-rewrite.stpl
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#=========================================================================#
|
||||||
|
# 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;
|
||||||
|
RewriteEngine On;
|
||||||
|
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known\/) {
|
||||||
|
deny all;
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
RewriteEngine On;
|
||||||
|
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_*;
|
||||||
|
}
|
||||||
54
install/rpm/templates/web/nginx/nginx-php-rewrite.tpl
Executable file
54
install/rpm/templates/web/nginx/nginx-php-rewrite.tpl
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#=========================================================================#
|
||||||
|
# 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;
|
||||||
|
RewriteEngine On;
|
||||||
|
|
||||||
|
location ~ /\.(?!well-known\/) {
|
||||||
|
deny all;
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
RewriteEngine On;
|
||||||
|
|
||||||
|
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_*;
|
||||||
|
}
|
||||||
64
install/rpm/templates/web/nginx/nginx-php.stpl
Executable file
64
install/rpm/templates/web/nginx/nginx-php.stpl
Executable 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_*;
|
||||||
|
}
|
||||||
51
install/rpm/templates/web/nginx/nginx-php.tpl
Executable file
51
install/rpm/templates/web/nginx/nginx-php.tpl
Executable 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_*;
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: hestia
|
Name: hestia
|
||||||
Version: 1.9.6
|
Version: 1.9.6
|
||||||
Release: 3%{dist}
|
Release: 4%{dist}
|
||||||
Summary: Hestia Control Panel
|
Summary: Hestia Control Panel
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
@@ -184,6 +184,10 @@ fi
|
|||||||
%{_tmpfilesdir}/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 19 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-4
|
||||||
|
- 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
|
* Thu Jan 15 2026 Alexey Berezhok <a@bayrepo.ru> - 1.9.6-3
|
||||||
- Fix error on local php installation and extension activation
|
- Fix error on local php installation and extension activation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user