Skip to content

Commit

Permalink
Merge branch 'master' into 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Jun 8, 2021
2 parents d59ac36 + 957029b commit 0bfe0d8
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 108 deletions.
16 changes: 7 additions & 9 deletions web-nginx-mysql/alpine/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ server {
large_client_header_buffers 8 8k;
client_max_body_size 10M;


location = /favicon.ico {
log_not_found off;
}
Expand All @@ -26,12 +25,6 @@ server {
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
Expand All @@ -40,14 +33,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
18 changes: 9 additions & 9 deletions web-nginx-mysql/alpine/conf/etc/zabbix/nginx_ssl.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
server {
listen 8443 ssl http2;
listen [::]:8443 ssl http2;

server_name zabbix;
server_name_in_redirect off;

Expand Down Expand Up @@ -31,7 +32,7 @@ server {

location =/nginx_status {
stub_status on;
access_log off;
access_log off;
allow 127.0.0.1;
deny all;
}
Expand All @@ -44,12 +45,6 @@ server {
allow all;
log_not_found off;
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
Expand All @@ -60,14 +55,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
16 changes: 7 additions & 9 deletions web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ server {
large_client_header_buffers 8 8k;
client_max_body_size 10M;


location = /favicon.ico {
log_not_found off;
}
Expand All @@ -26,12 +25,6 @@ server {
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
Expand All @@ -40,14 +33,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
17 changes: 8 additions & 9 deletions web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server {

location =/nginx_status {
stub_status on;
access_log off;
access_log off;
allow 127.0.0.1;
deny all;
}
Expand All @@ -45,12 +45,6 @@ server {
allow all;
log_not_found off;
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
Expand All @@ -61,14 +55,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
16 changes: 7 additions & 9 deletions web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ server {
large_client_header_buffers 8 8k;
client_max_body_size 10M;


location = /favicon.ico {
log_not_found off;
}
Expand All @@ -26,12 +25,6 @@ server {
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
Expand All @@ -40,14 +33,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
17 changes: 8 additions & 9 deletions web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server {

location =/nginx_status {
stub_status on;
access_log off;
access_log off;
allow 127.0.0.1;
deny all;
}
Expand All @@ -45,12 +45,6 @@ server {
allow all;
log_not_found off;
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
Expand All @@ -61,14 +55,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
16 changes: 7 additions & 9 deletions web-nginx-pgsql/alpine/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ server {
large_client_header_buffers 8 8k;
client_max_body_size 10M;


location = /favicon.ico {
log_not_found off;
}
Expand All @@ -26,12 +25,6 @@ server {
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
Expand All @@ -40,14 +33,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
17 changes: 8 additions & 9 deletions web-nginx-pgsql/alpine/conf/etc/zabbix/nginx_ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server {

location =/nginx_status {
stub_status on;
access_log off;
access_log off;
allow 127.0.0.1;
deny all;
}
Expand All @@ -45,12 +45,6 @@ server {
allow all;
log_not_found off;
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
Expand All @@ -61,14 +55,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
16 changes: 7 additions & 9 deletions web-nginx-pgsql/centos/conf/etc/zabbix/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ server {
large_client_header_buffers 8 8k;
client_max_body_size 10M;


location = /favicon.ico {
log_not_found off;
}
Expand All @@ -26,12 +25,6 @@ server {
access_log off;
}

# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
Expand All @@ -40,14 +33,19 @@ server {
}

# caching of files
location ~* \.(ico|pdf|flv)$ {
location ~* \.ico$ {
expires 1y;
}

location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
location ~* \.(js|css|png|jpg|jpeg|gif|xml|txt)$ {
expires 14d;
}

location ~ /(app\/|conf[^\.]|include|locale) {
deny all;
return 404;
}

location / {
try_files $uri $uri/ /index.php?$args;
}
Expand Down
Loading

0 comments on commit 0bfe0d8

Please sign in to comment.