[Auto-Sync] Atualização das configurações em srvproxy001.itguys.com.br - 2025-12-05 00:34:53
This commit is contained in:
parent
af949c027a
commit
74e64ef5d7
|
|
@ -33,8 +33,6 @@ events {
|
|||
}
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 128;
|
||||
include /etc/letsencrypt/le_http_01_cert_challenge.conf;
|
||||
# --- Configurações Globais Mínimas ---
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
|
|
|
|||
|
|
@ -103,70 +103,3 @@ server {
|
|||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
server {rewrite ^(/.well-known/acme-challenge/.*) $1 break; # managed by Certbot
|
||||
|
||||
rewrite ^(/.well-known/acme-challenge/.*) $1 break; # managed by Certbot
|
||||
|
||||
|
||||
# --- Bloco 1: Configurações de Escuta e Servidor Padrão ---
|
||||
listen 80 ;
|
||||
listen [::]:80 ;
|
||||
listen 8080 ;
|
||||
listen 443 ssl http2 ;
|
||||
listen [::]:443 ssl http2 ;
|
||||
|
||||
# --- Bloco 2: Configurações de SSL ---
|
||||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||
|
||||
# --- Bloco 3: Nome do Servidor ---
|
||||
server_name www.enseg.com.br enseg.com.br; # managed by Certbot
|
||||
|
||||
# --- Bloco 4: Gestão de Logs ---
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
|
||||
# --- Bloco 5: Diretório Raiz para os Ficheiros de Erro ---
|
||||
root /var/www/html/errors;
|
||||
|
||||
# --- Bloco 6: Mapeamento de Códigos de Erro para Páginas Personalizadas ---
|
||||
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
|
||||
deny all; # Bloqueia todos os outros
|
||||
}
|
||||
|
||||
error_page 403 /403.html;
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
# --- Bloco 7: Lógica para Servir as Páginas de Erro de Forma Segura ---
|
||||
location = /403.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
location = /404.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
location = /50x.html {
|
||||
internal;
|
||||
}
|
||||
|
||||
# --- Bloco 8: Ação Padrão para Todas as Requisições ---
|
||||
# Retorna 404 para qualquer URI, o que aciona a regra "error_page" correspondente.
|
||||
location / {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location = /.well-known/acme-challenge/oBlIj53IzzDA_GBBLqPlvxzISqu8SAf_23MtKFDCJrQ{default_type text/plain;return 200 oBlIj53IzzDA_GBBLqPlvxzISqu8SAf_23MtKFDCJrQ.6NQOP-_cyjMVLz8P4PfH0klS5ZH2qgREfeMrgpUfnEk;} # managed by Certbot
|
||||
|
||||
|
||||
location = /.well-known/acme-challenge/xpXt-P89DDZ06e3GKCkuJMjBL3Rn6OteGhojiK4NLtc{default_type text/plain;return 200 xpXt-P89DDZ06e3GKCkuJMjBL3Rn6OteGhojiK4NLtc.6NQOP-_cyjMVLz8P4PfH0klS5ZH2qgREfeMrgpUfnEk;} # managed by Certbot
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue