Starlio-web/nginx.conf

31 lines
684 B
Nginx Configuration File
Raw Normal View History

events { }
2024-10-18 20:51:41 +03:00
http {
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com;
location / {
return 301 https://$host$request_uri;
}
2024-10-18 20:51:41 +03:00
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name example.com;
2024-10-18 20:51:41 +03:00
ssl_certificate /etc/nginx/ssl/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
2024-10-18 20:51:41 +03:00
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
2024-10-18 20:51:41 +03:00
add_header Strict-Transport-Security "max-age=63072000" always;
2024-10-18 20:51:41 +03:00
}
2024-10-18 20:51:41 +03:00
}