]> TLD Linux GIT Repositories - packages/apache.git/commitdiff
- strenghten SSL config, it gets 100% A+ result on SSL Labs test
authorMarcin Krol <hawk@tld-linux.org>
Sun, 22 Jul 2018 16:29:27 +0000 (16:29 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 22 Jul 2018 16:29:27 +0000 (16:29 +0000)
apache-mod_ssl.conf

index 5fdfa7e1ea3fd89af8c819a9cdccdf8db285e9bd..2bd073b1d1e0c605b64536046eddc6ba684316c6 100644 (file)
@@ -64,19 +64,32 @@ SSLSessionCacheTimeout  300
 #   This directive can be used to control the SSL protocol flavors mod_ssl
 #   should use when establishing its server environment. Clients then can only
 #   connect with one of the provided protocols.
-SSLProtocol all -SSLv2 -SSLv3
+SSLProtocol -all TLSv1.2
 
 #   SSL Cipher Suite:
 #   List the ciphers that the client is permitted to negotiate.
 #   See the mod_ssl documentation for a complete list.
-SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
+SSLCipherSuite HIGH:!aNULL:!MD5:!3DES:!CAMELLIA128:!AES128
 
 SSLHonorCipherOrder on
 
 SSLCompression off
 
+#   Use this command to generate 4096 DH parameters (it will take long time):
+#   openssl dhparam -out /etc//httpd/ssl/dhparams.pem 4096
+#   When finished, uncomment line below
+#SSLOpenSSLConfCmd DHParameters /etc/httpd/ssl/dhparams.pem
+
+SSLOpenSSLConfCmd ECDHParameters secp384r1
+SSLOpenSSLConfCmd Curves secp521r1:secp384r1
+
+Header always set Strict-Transport-Security max-age=31556952;includeSubDomains
+Header always set X-Frame-Options SAMEORIGIN
+Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
+Header always set X-Content-Type-Options nosnif
+
 # OCSP Stapling
-SSLUseStapling          off
+SSLUseStapling          on
 SSLStaplingResponderTimeout 5
 SSLStaplingReturnResponderErrors off
 SSLStaplingCache        shmcb:/var/cache/httpd/ocsp(128000)