diff --git a/nginx/sites-available/default-catchall.conf b/nginx/sites-available/default-catchall.conf index ed3d47a..0c8a53c 100644 --- a/nginx/sites-available/default-catchall.conf +++ b/nginx/sites-available/default-catchall.conf @@ -73,7 +73,15 @@ server { error_page 403 /403.html; error_page 404 /404.html; error_page 500 502 503 504 /50x.html; + location = /nginx_status { + stub_status; + # --- Segurança (removi a linha duplicada para limpeza) --- + allow 127.0.0.1; # Acesso local (localhost) + allow 172.16.254.1; # Permite o próprio servidor / Zabbix + allow 172.16.254.11; + deny all; # Bloqueia todos os outros + } # --- Bloco 7: Lógica para Servir as Páginas de Erro de Forma Segura --- location = /403.html { internal; @@ -92,13 +100,4 @@ server { location / { return 404; } - location /nginx_status { - stub_status; - - # --- Segurança --- - allow 127.0.0.1; # Acesso local (localhost) - allow 172.16.254.1; # Permite o próprio servidor - allow 172.16.254.1; # << ADICIONE O IP DO SEU ZABBIX/MONITOR AQUI - deny all; # Bloqueia todos os outros -} }