[Auto-Sync] Atualização das configurações em srvproxy001.itguys.com.br - 2025-11-07 00:41:49
This commit is contained in:
parent
4611d36fa2
commit
0bc070ef79
|
|
@ -0,0 +1,98 @@
|
|||
# ======================================================================
|
||||
# INÍCIO - CONFIGURAÇÃO WINDMILL
|
||||
# ======================================================================
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Windmill (windmill.grupopralog.com.br) - HTTP (Porta 80)
|
||||
# Redireciona para HTTPS e serve o desafio ACME (Let's Encrypt).
|
||||
# ----------------------------------------------------------------------
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name windmill.grupopralog.com.br;
|
||||
|
||||
# Regra para renovação do Let's Encrypt
|
||||
location ~ /.well-known/acme-challenge/ {
|
||||
allow all;
|
||||
root /var/www/html; # O mesmo diretório do seu Nextcloud
|
||||
}
|
||||
|
||||
# Redirecionamento forçado para HTTPS
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Windmill (windmill.grupopralog.com.br) - HTTPS (Porta 443)
|
||||
# Configuração principal e segura.
|
||||
# ----------------------------------------------------------------------
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name windmill.grupopralog.com.br;
|
||||
|
||||
# --- Caminhos dos Certificados (Serão preenchidos pelo Certbot) ---
|
||||
ssl_certificate /etc/letsencrypt/live/windmill.grupopralog.com.br/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/windmill.grupopralog.com.br/privkey.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/windmill.grupopralog.com.br/fullchain.pem;
|
||||
|
||||
# --- Segurança: SSL/TLS (Copiado da sua config do Nextcloud) ---
|
||||
ssl_protocols TLSv1.3 TLSv1.2;
|
||||
ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY_1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305';
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ecdh_curve X25519:secp256r1:secp384r1;
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_tickets off;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver 127.0.0.1 valid=300s;
|
||||
resolver_timeout 5s;
|
||||
|
||||
# --- Segurança: Headers HTTP (Copiado da sua config) ---
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
|
||||
# --- Compressão (Copiado da sua config) ---
|
||||
brotli on;
|
||||
brotli_comp_level 6;
|
||||
brotli_min_length 1024;
|
||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml text/css text/javascript text/plain text/xml;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_min_length 1024;
|
||||
gzip_types application/atom+xml application/javascript application/json application/rss+xml text/css text/javascript text/plain text/xml;
|
||||
|
||||
# --- Logging Dedicado (Conforme suas instruções) ---
|
||||
access_log /var/log/nginx/windmill.access.log detailed_proxy; # Assumindo que 'detailed_proxy' está no seu httpd.conf
|
||||
error_log /var/log/nginx/windmill.error.log warn;
|
||||
|
||||
# --- Configuração do Proxy para o Windmill ---
|
||||
location / {
|
||||
proxy_pass http://windmill_backend; # Aponta para o upstream que criamos
|
||||
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;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# --- Suporte a WebSockets (CRÍTICO para a UI do Windmill) ---
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# --- Otimização de Buffers e Timeouts ---
|
||||
proxy_buffering off; # Essencial para UI reativa
|
||||
proxy_request_buffering off;
|
||||
proxy_read_timeout 900s; # Timeouts longos para jobs
|
||||
proxy_send_timeout 900s;
|
||||
}
|
||||
}
|
||||
|
||||
# ======================================================================
|
||||
# FIM - CONFIGURAÇÃO WINDMILL
|
||||
# ======================================================================
|
||||
Loading…
Reference in New Issue