[Auto-Sync] Atualização das configurações em srvproxy001.itguys.com.br - 2025-09-15 18:00:27
This commit is contained in:
parent
d00a77951c
commit
19333bf33e
|
|
@ -0,0 +1,47 @@
|
|||
# Ficheiro: /etc/nginx/sites-available/billing.itguys.com.br.conf
|
||||
|
||||
# Bloco para redirecionar todo o tráfego HTTP para HTTPS
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name billing.itguys.com.br;
|
||||
|
||||
# Regra especial para a validação do Let's Encrypt (para que funcione mesmo com a trava de rede)
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
# Bloco principal para o site HTTPS
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name billing.itguys.com.br;
|
||||
|
||||
# O Certbot vai gerir estas linhas
|
||||
# ssl_certificate /etc/letsencrypt/live/billing.itguys.com.br/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/billing.itguys.com.br/privkey.pem;
|
||||
|
||||
# --- A TRAVA DE SEGURANÇA MAIS IMPORTANTE ---
|
||||
# Só permite o acesso a partir das suas redes internas definidas.
|
||||
include /etc/nginx/conf.d/internal_networks.conf;
|
||||
|
||||
access_log /var/log/nginx/access.log detailed_proxy;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
location / {
|
||||
# Endereço do seu servidor MagnusBilling. Assumindo que a interface web corre na porta 80.
|
||||
# Se for outra porta ou HTTPS, ajuste aqui.
|
||||
proxy_pass http://172.16.254.130;
|
||||
|
||||
# Cabeçalhos essenciais para que a aplicação funcione corretamente atrás de um proxy
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue