[Auto-Sync] Atualização das configurações em srvproxy001.itguys.com.br - 2025-09-20 15:01:53
This commit is contained in:
parent
3be46bbca7
commit
ff14fdb4ff
|
|
@ -8,6 +8,16 @@
|
|||
# BLOCO 1: Redirecionar todo o tráfego da porta 80 para a versão segura SEM WWW
|
||||
# ==============================================================================
|
||||
server {
|
||||
if ($host = www.anatram.com.br) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
if ($host = anatram.com.br) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
# Apanha ambos os domínios, com e sem 'www'.
|
||||
|
|
@ -22,6 +32,10 @@ server {
|
|||
location / {
|
||||
return 301 https://anatram.com.br$request_uri;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
|
|
@ -35,6 +49,9 @@ server {
|
|||
|
||||
# Envia um redirecionamento permanente para a versão canónica sem 'www'.
|
||||
return 301 https://anatram.com.br$request_uri;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/anatram.com.br/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/anatram.com.br/privkey.pem; # managed by Certbot
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
|
|
@ -69,7 +86,7 @@ server {
|
|||
# 1. Rota para Ficheiros Estáticos (Cache Agressivo)
|
||||
location ~* \.(?:css|js|mjs|svg|gif|png|jpg|jpeg|ico|wasm|woff2?|ttf|eot)$ {
|
||||
# Usa o nosso snippet de cache mais agressivo para a máxima performance.
|
||||
include /etc/nginx/snippets/cache_aggressive_static.conf;
|
||||
include /etc/nginx/snippets/cache_static_assets.conf;
|
||||
|
||||
# Como o backend é HTTPS, precisamos de dizer ao Nginx para não verificar o certificado interno.
|
||||
proxy_ssl_verify off;
|
||||
|
|
@ -88,4 +105,7 @@ server {
|
|||
proxy_ssl_verify off;
|
||||
proxy_pass https://172.16.12.9:443;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/anatram.com.br/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/anatram.com.br/privkey.pem; # managed by Certbot
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue