diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 4d5081d..79a2346 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -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;