Merge pull request 'HttpsUpgrade' (#5) from HttpsUpgrade into main

Reviewed-on: http://203.171.20.94:3000/PhuongDM/TTMT.ManageWebGUI/pulls/5
This commit is contained in:
Do Manh Phuong 2026-04-04 19:20:43 +07:00
commit c9960aea75

View File

@ -5,16 +5,28 @@
# }
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 / {
# root /usr/share/nginx/html;
# index index.html index.htm;
return 301 https://$host$request_uri;
}
}
server{
listen 443 ssl;
server_name comp.soict.io;
ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;
ssl_certificate /etc/letsencrypt/live/comp.soict.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/comp.soict.io/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
set $backend_server 172.18.10.8:8080;
root /usr/share/nginx/html;