Last active
August 6, 2018 16:57
-
-
Save kenjij/cc93165babf1f3b4b040 to your computer and use it in GitHub Desktop.
Secure and optimized NGINX SSL configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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