From 41f1243063436c301e10a9f5bc255b695d2dfc8b Mon Sep 17 00:00:00 2001 From: "srvproxy001.itguys.com.br" Date: Mon, 15 Sep 2025 18:26: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-15=2018:26:22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/.certbot.lock | 0 nginx/nginx.conf | 2 -- nginx/sites-available/telefonia.itguys.com.br.conf | 14 ++++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 nginx/.certbot.lock diff --git a/nginx/.certbot.lock b/nginx/.certbot.lock deleted file mode 100644 index e69de29..0000000 diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 828aff2..8d66d7b 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -11,8 +11,6 @@ events { } http { -server_names_hash_bucket_size 128; -include /etc/letsencrypt/le_http_01_cert_challenge.conf; #Configuraçoes de Cache proxy_cache_path /var/cache/nginx/zabbix_cache levels=1:2 keys_zone=zabbix_cache:10m max_size=1g inactive=60m use_temp_path=off; proxy_cache_path /var/cache/nginx/api_cache levels=1:2 keys_zone=api_cache:10m max_size=100m inactive=5m use_temp_path=off; diff --git a/nginx/sites-available/telefonia.itguys.com.br.conf b/nginx/sites-available/telefonia.itguys.com.br.conf index b8ef835..027ca16 100644 --- a/nginx/sites-available/telefonia.itguys.com.br.conf +++ b/nginx/sites-available/telefonia.itguys.com.br.conf @@ -1,7 +1,10 @@ # Ficheiro: /etc/nginx/sites-available/billing.itguys.com.br.conf # Bloco para redirecionar todo o tráfego HTTP para HTTPS -server {rewrite ^(/.well-known/acme-challenge/.*) $1 break; # managed by Certbot +server { + if ($host = telefonia.itguys.com.br) { + return 301 https://$host$request_uri; + } # managed by Certbot listen 80; @@ -16,14 +19,12 @@ server {rewrite ^(/.well-known/acme-challenge/.*) $1 break; # managed by Certbot location / { return 301 https://$host$request_uri; } -location = /.well-known/acme-challenge/phNdNnU-M4TuLLgpj88JhERIopQm1S-hfuqcuM7BFfM{default_type text/plain;return 200 phNdNnU-M4TuLLgpj88JhERIopQm1S-hfuqcuM7BFfM.k0xoa7ZfB3Jb5woCPbxO02UTpvLWmKxfos4fkjuNkWU;} # managed by Certbot + } # Bloco principal para o site HTTPS -server {rewrite ^(/.well-known/acme-challenge/.*) $1 break; # managed by Certbot - - +server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name telefonia.itguys.com.br; @@ -50,6 +51,7 @@ server {rewrite ^(/.well-known/acme-challenge/.*) $1 break; # managed by Certbot proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } -location = /.well-known/acme-challenge/phNdNnU-M4TuLLgpj88JhERIopQm1S-hfuqcuM7BFfM{default_type text/plain;return 200 phNdNnU-M4TuLLgpj88JhERIopQm1S-hfuqcuM7BFfM.k0xoa7ZfB3Jb5woCPbxO02UTpvLWmKxfos4fkjuNkWU;} # managed by Certbot + ssl_certificate /etc/letsencrypt/live/telefonia.itguys.com.br/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/telefonia.itguys.com.br/privkey.pem; # managed by Certbot }