2022-03-04 03:25:40 +00:00
|
|
|
listen 80;
|
|
|
|
listen 443 ssl http2;
|
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload";
|
|
|
|
|
|
|
|
ssl_certificate /etc/letsencrypt/live/$ssl_server_name/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/$ssl_server_name/privkey.pem;
|
|
|
|
ssl_session_timeout 1d;
|
|
|
|
ssl_session_cache shared:SSL:10m;
|
|
|
|
ssl_session_tickets off;
|
|
|
|
ssl_dhparam /etc/nginx/dhparam.pem;
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
2022-03-04 03:55:58 +00:00
|
|
|
ssl_prefer_server_ciphers on;
|
2022-03-04 03:25:40 +00:00
|
|
|
ssl_stapling on;
|
|
|
|
ssl_stapling_verify on;
|
|
|
|
ssl_trusted_certificate /etc/ssl/cert.pem;
|
|
|
|
|
|
|
|
if ($redirect_to_https) {
|
|
|
|
return 301 https://$http_host$request_uri;
|
|
|
|
}
|