From 6ffdf0a28611e418e074890c3577ed1191481dbe Mon Sep 17 00:00:00 2001 From: bachhungcb Date: Sat, 4 Apr 2026 17:05:41 +0700 Subject: [PATCH] update nginx conf for better redirection --- nginx/nginx.conf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 4d5081d..cece815 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -5,8 +5,15 @@ # } server { listen 80; - return 301 https://$host$request_uri; # Redirect HTTP sang HTTPS - + server_name comp.soict.io; + + location /.well-known/acme-challenge/ { + root /var/www/certbot; + } + + location / { + return 301 https://$host$request_uri; + } } server{