diff --git a/install/rpm/templates/web/nginx/nginx-php-rewrite.stpl b/install/rpm/templates/web/nginx/nginx-php-rewrite.stpl index 5387e5b..97482ea 100755 --- a/install/rpm/templates/web/nginx/nginx-php-rewrite.stpl +++ b/install/rpm/templates/web/nginx/nginx-php-rewrite.stpl @@ -25,20 +25,19 @@ server { include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; HtaccessEnable on; - RewriteEngine 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 ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ { - expires max; - fastcgi_hide_header "Set-Cookie"; - } location ~ [^/]\.php(/|$) { try_files $uri =404; diff --git a/install/rpm/templates/web/nginx/nginx-php-rewrite.tpl b/install/rpm/templates/web/nginx/nginx-php-rewrite.tpl index 32f9db6..445649a 100755 --- a/install/rpm/templates/web/nginx/nginx-php-rewrite.tpl +++ b/install/rpm/templates/web/nginx/nginx-php-rewrite.tpl @@ -16,21 +16,20 @@ server { include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; HtaccessEnable on; - RewriteEngine 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 ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ { - expires max; - fastcgi_hide_header "Set-Cookie"; - } - location ~ [^/]\.php(/|$) { try_files $uri =404; diff --git a/src/rpm/hestia/hestia.spec b/src/rpm/hestia/hestia.spec index 421248c..af1cf1c 100644 --- a/src/rpm/hestia/hestia.spec +++ b/src/rpm/hestia/hestia.spec @@ -3,7 +3,7 @@ Name: hestia Version: 1.9.6 -Release: 4%{dist} +Release: 5%{dist} Summary: Hestia Control Panel Group: System Environment/Base License: GPLv3 @@ -184,7 +184,7 @@ fi %{_tmpfilesdir}/%{name}.conf %changelog -* Thu Mar 19 2026 Alexey Berezhok - 1.9.6-4 +* Thu Mar 19 2026 Alexey Berezhok - 1.9.6-5 - Added nginx with mod_rewrite - Added templates for nginx mod_rewrite activation