Skip to content

Instantly share code, notes, and snippets.

@pedroagabreu
Last active October 12, 2015 19:49
Show Gist options
  • Save pedroagabreu/ae87dc081ff0588bbeff to your computer and use it in GitHub Desktop.
Save pedroagabreu/ae87dc081ff0588bbeff to your computer and use it in GitHub Desktop.
Apache 2.4 SSL configuration.
# Perfect Forward Secrecy ciphers
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
SSLHonorCipherOrder on
# Enabled protocols
SSLProtocol all -SSLv2 -SSLv3
# OCSP stapling
SSLUseStapling on
SSLStaplingResponderTimeout 5
SSLStaplingReturnResponderErrors off
SSLStaplingCache shmcb:/var/run/ocsp(128000)
# HSTS for six months
Header add Strict-Transport-Security "max-age=15768000"
# Header add Strict-Transport-Security: max-age=15768000 ; includeSubDomains
# You may want to force HTTPS via mod rewrite too
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment