From 166db55593f94143672fbe536690c643cfca647e Mon Sep 17 00:00:00 2001 From: "srvproxy001.itguys.com.br" Date: Sat, 27 Sep 2025 22:13:22 -0300 Subject: [PATCH] =?UTF-8?q?[Auto-Sync]=20Atualiza=C3=A7=C3=A3o=20das=20con?= =?UTF-8?q?figura=C3=A7=C3=B5es=20em=20srvproxy001.itguys.com.br=20-=20202?= =?UTF-8?q?5-09-27=2022:13:22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/sites-available/ns1.itguys.com.br.conf | 85 -------------------- 1 file changed, 85 deletions(-) delete mode 100644 nginx/sites-available/ns1.itguys.com.br.conf diff --git a/nginx/sites-available/ns1.itguys.com.br.conf b/nginx/sites-available/ns1.itguys.com.br.conf deleted file mode 100644 index 73e0f4e..0000000 --- a/nginx/sites-available/ns1.itguys.com.br.conf +++ /dev/null @@ -1,85 +0,0 @@ -# ============================================================================== -# ARQUIVO: /etc/nginx/sites-available/ns1.itguys.com.br.conf -# AUTOR: Gemini (Especialista NGINX) -# DATA: 21/09/2025 -# -# DESCRIÇÃO: -# Configuração de Proxy Reverso OTIMIZADA e SEGURA para Technitium DNS Server. -# -# FUNCIONALIDADES: -# - Proxy para um backend HTTPS (https://172.16.254.253:53443). -# - Redirecionamento canónico forçado para HTTPS. -# - Restrição de Acesso à rede interna. -# - Suporte a WebSockets para a interface em tempo real. -# - Cache ativado para assets estáticos. -# ============================================================================== - -# Define o nosso servidor Technitium como um "upstream". -# O NGINX irá se conectar a este backend usando HTTPS. -upstream technitium_backend { - server 172.16.254.253:53443; -} - -# ============================================================================== -# BLOCO 1: Redirecionamento de HTTP (porta 80) para HTTPS -# ============================================================================== -server { - listen 80; - listen [::]:80; - server_name ns1.itguys.com.br; - - location /.well-known/acme-challenge/ { - root /var/www/html; - } - - location / { - return 301 https://$host$request_uri; - } -} - -# ============================================================================== -# BLOCO 2: Servidor Principal - Proxy Reverso para Technitium DNS (HTTPS) -# ============================================================================== -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - server_name ns1.itguys.com.br; - - # --- CONFIGURAÇÕES DE SSL E SEGURANÇA --- - include /etc/nginx/snippets/ssl_params.conf; - add_header X-Content-Type-Options "nosniff" always; - add_header X-Frame-Options "SAMEORIGIN" always; - - # --- POLÍTICAS DE ACESSO E LOGS --- - include /etc/nginx/snippets/internal_networks.conf; - include /etc/nginx/snippets/global_robots.conf; - access_log /var/log/nginx/ns1.itguys.com.br.access.log; - error_log /var/log/nginx/ns1.itguys.com.br.error.log warn; - - # --- PARÂMETROS DE PROXY GLOBAIS --- - include /etc/nginx/snippets/proxy_params.conf; - # Essencial para o proxy funcionar com um backend HTTPS com certificado autoassinado. - proxy_ssl_verify off; - - # --- REGRAS DE ROTEAMENTO (LOCATIONS) --- - - # 1. Rota para assets estáticos (CACHE AGRESSIVO) - location ~* \.(?:css|js|mjs|svg|gif|png|jpg|jpeg|ico|wasm|woff2?|ttf|eot)$ { - proxy_cache technitium_cache; - proxy_cache_valid 200 7d; - proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; - add_header X-Proxy-Cache $upstream_cache_status; - proxy_pass https://technitium_backend; - } - - # 2. Rota principal para a aplicação (SEM CACHE, COM WEBSOCKETS) - location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_pass https://technitium_backend; - } - - # --- Páginas de Erro Personalizadas --- - include /etc/nginx/snippets/custom_errors.conf; -}