Skip to content

Instantly share code, notes, and snippets.

@kenjij
Last active August 6, 2018 16:57
Show Gist options
  • Save kenjij/cc93165babf1f3b4b040 to your computer and use it in GitHub Desktop.
Save kenjij/cc93165babf1f3b4b040 to your computer and use it in GitHub Desktop.
Secure and optimized NGINX SSL configuration
http {
# Shared cache size; 1MB = 4000 sessions
ssl_session_cache shared:SSL:10m;
# Decrease timeout if resources are low
ssl_session_timeout 10m;
# Good-bye SSL
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;
# OCSP stapling
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/nginx/cachain.crt;
# OCSP stapling requires DNS
resolver 8.8.8.8 8.8.4.4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment