X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=apache-mod_ssl.conf;h=2bd073b1d1e0c605b64536046eddc6ba684316c6;hb=fd6a979d6b76c6b1f675b81caeafcd444040498d;hp=ea88204eef0671ee53b0966f3cdc61bbdd0a5fc5;hpb=ab20a64026d7ac29f8461e582c6bb1f33c882720;p=packages%2Fapache.git diff --git a/apache-mod_ssl.conf b/apache-mod_ssl.conf index ea88204..2bd073b 100644 --- a/apache-mod_ssl.conf +++ b/apache-mod_ssl.conf @@ -54,24 +54,48 @@ SSLPassPhraseDialog builtin # Configure the SSL Session Cache: First the mechanism # to use and second the expiring timeout (in seconds). #SSLSessionCache dbm:/var/cache/httpd/ssl_scache -#SSLSessionCache shmcb:/var/cache/httpd/ssl_scache(512000) - -# Replace this with one of the above (addition apache-mod_socache -# needs to be installed and a apropriate module has to be loaded) -SSLSessionCache nonenotnull +#SSLSessionCache shmcb:/var/run/ssl_scache(512000) +SSLSessionCache shmcb:/var/cache/httpd/ssl_scache(512000) SSLSessionCacheTimeout 300 +# FOLLOW SECURE DEFAULTS: https://wiki.mozilla.org/Security/Server_Side_TLS + # Usable SSL protocol flavors: # 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 +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 ALL:!ADH:!EXP:!LOW:!SSLv2:RC4+RSA:+HIGH:+MEDIUM +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 on +SSLStaplingResponderTimeout 5 +SSLStaplingReturnResponderErrors off +SSLStaplingCache shmcb:/var/cache/httpd/ocsp(128000) + +# Whether to allow non-SNI clients to access a name-based virtual host. +#SSLStrictSNIVHostCheck on ## ## SSL Virtual Host Context @@ -82,6 +106,10 @@ SSLCipherSuite ALL:!ADH:!EXP:!LOW:!SSLv2:RC4+RSA:+HIGH:+MEDIUM # Enable/Disable SSL for this virtual host. SSLEngine on +# Enable, if you have real ssl cert and want to cache OCSP +# https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx +SSLUseStapling off + # Server Certificate: # Point SSLCertificateFile at a PEM encoded certificate. If # the certificate is encrypted, then you will be prompted for a @@ -212,7 +240,8 @@ SSLCertificateKeyFile /etc/httpd/ssl/server.key # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and # "force-response-1.0" for this. - BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 + BrowserMatch ".*MSIE [2-5]\..*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 + BrowserMatch ".*MSIE [6-9]\..*" ssl-unclean-shutdown # Per-Server Logging: