update nginx conf for better redirection

This commit is contained in:
bachhungcb 2026-04-04 17:05:41 +07:00
parent 0286e6e217
commit 6ffdf0a286

View File

@ -5,8 +5,15 @@
# } # }
server { server {
listen 80; 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{ server{