# generated 2024-12-09, Mozilla Guideline v5.7, nginx 1.27.3, OpenSSL 3.4.0, modern config # https://ssl-config.mozilla.org/#server=nginx&version=1.27.3&config=modern&openssl=3.4.0&guideline=5.7 http { server { listen 443 ssl; listen [::]:443 ssl; http2 on; ssl_certificate /path/to/signed_cert_plus_intermediates; ssl_certificate_key /path/to/private_key; # HSTS (ngx_http_headers_module is required) (63072000 seconds) add_header Strict-Transport-Security "max-age=63072000" always; } ssl_session_timeout 1d; ssl_session_cache shared:MozSSL:10m; # about 40000 sessions # modern configuration ssl_protocols TLSv1.3; ssl_ecdh_curve X25519:prime256v1:secp384r1; ssl_prefer_server_ciphers off; # OCSP stapling ssl_stapling on; ssl_stapling_verify on; # verify chain of trust of OCSP response using Root CA and Intermediate certs ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates; # replace with the IP address of your resolver resolver 127.0.0.1; # HSTS server { listen 80 default_server; listen [::]:80 default_server; return 301 https://$host$request_uri; } }