Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configuration SSL pour Let's Encrypt pour avoir une note A+ sur SSLLabs
# Specify the TLS versions
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# Ciphersuites recommendation from the
# Use this chipersuites to get 100 points of the SSLabs test
# Some device will not support
# Mozilla Ciphersuits Recommendation
# Use this for all devices supports
# Use the DHPARAM key and ECDH curve >= 256bit
# ssl_ecdh_curve secp384r1;
# ssl_dhparam /etc/nginx/dhparam.pem;
server_tokens off;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
# Enable HTTP Strict-Transport-Security
# If you have a subdomain of your site,
# be carefull to use the 'includeSubdomains' options
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
# Enable OSCP Stapling for Nginx web server
# If you're using the SSL from Letsencrypt,
# use the 'chain.pem' certificate
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/letsencrypt/live/lenomdevotrecertificatletsencrypt/fullchain.pem;
resolver valid=300s;
resolver_timeout 5s;
# XSS Protection for Nginx web server
# add_header X-Frame-Options DENY;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# add_header X-Robots-Tag none;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.