2022-07-26 16:52:08 +07:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name lago.example;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
index index.html index.htm;
|
|
|
|
try_files $uri $uri/ /index.html =404;
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
|
|
root /var/www/certbot;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
server_name lago.example;
|
|
|
|
|
|
|
|
location / {
|
2022-11-24 22:11:08 +07:00
|
|
|
root /usr/share/nginx/html;
|
|
|
|
index index.html index.htm;
|
|
|
|
try_files $uri $uri/ /index.html =404;
|
2022-07-26 16:52:08 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/lago.example/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/lago.example/privkey.pem;
|
|
|
|
|
|
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
}
|