Optimizations for Nginx configs

This commit is contained in:
Alexey Pustovalov 2021-06-08 18:09:00 -04:00
parent 957029b5b5
commit ec9e888ea2
24 changed files with 108 additions and 24 deletions

View File

@ -42,4 +42,12 @@
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -5,8 +5,6 @@ Listen 8443
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost *:8443> <VirtualHost *:8443>
SSLEngine on
DocumentRoot /usr/share/zabbix/ DocumentRoot /usr/share/zabbix/
ServerName zabbix ServerName zabbix
DirectoryIndex index.php DirectoryIndex index.php
@ -65,5 +63,13 @@ Listen 8443
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>
</IfModule> </IfModule>

View File

@ -42,4 +42,12 @@
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -4,8 +4,6 @@ LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Listen 8443 Listen 8443
<VirtualHost *:8443> <VirtualHost *:8443>
SSLEngine on
DocumentRoot /usr/share/zabbix/ DocumentRoot /usr/share/zabbix/
ServerName zabbix ServerName zabbix
DirectoryIndex index.php DirectoryIndex index.php
@ -64,4 +62,12 @@ Listen 8443
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -42,4 +42,12 @@
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -4,8 +4,6 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost *:8443> <VirtualHost *:8443>
SSLEngine on
DocumentRoot /usr/share/zabbix/ DocumentRoot /usr/share/zabbix/
ServerName zabbix ServerName zabbix
DirectoryIndex index.php DirectoryIndex index.php
@ -64,5 +62,13 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>
</IfModule> </IfModule>

View File

@ -42,4 +42,12 @@
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -5,8 +5,6 @@ Listen 8443
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost *:8443> <VirtualHost *:8443>
SSLEngine on
DocumentRoot /usr/share/zabbix/ DocumentRoot /usr/share/zabbix/
ServerName zabbix ServerName zabbix
DirectoryIndex index.php DirectoryIndex index.php
@ -65,5 +63,13 @@ Listen 8443
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>
</IfModule> </IfModule>

View File

@ -42,4 +42,12 @@
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -4,8 +4,6 @@ LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Listen 8443 Listen 8443
<VirtualHost *:8443> <VirtualHost *:8443>
SSLEngine on
DocumentRoot /usr/share/zabbix/ DocumentRoot /usr/share/zabbix/
ServerName zabbix ServerName zabbix
DirectoryIndex index.php DirectoryIndex index.php
@ -64,4 +62,12 @@ Listen 8443
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -42,4 +42,12 @@
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>

View File

@ -4,8 +4,6 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
<IfModule mod_ssl.c> <IfModule mod_ssl.c>
<VirtualHost *:8443> <VirtualHost *:8443>
SSLEngine on
DocumentRoot /usr/share/zabbix/ DocumentRoot /usr/share/zabbix/
ServerName zabbix ServerName zabbix
DirectoryIndex index.php DirectoryIndex index.php
@ -64,5 +62,13 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
Deny from all Deny from all
</files> </files>
</Directory> </Directory>
<Directory "/usr/share/zabbix/locale">
Require all denied
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>
</VirtualHost> </VirtualHost>
</IfModule> </IfModule>

View File

@ -41,7 +41,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -63,7 +63,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -41,7 +41,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -63,7 +63,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -41,7 +41,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -63,7 +63,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -41,7 +41,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -63,7 +63,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -41,7 +41,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -63,7 +63,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -41,7 +41,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }

View File

@ -63,7 +63,7 @@ server {
expires 14d; expires 14d;
} }
location ~ /(app\/|conf[^\.]|include|locale) { location ~ /(app\/|conf[^\.]|include\/|local\/|locale\/) {
deny all; deny all;
return 404; return 404;
} }