X-Git-Url: https://git.tld-linux.org/?p=packages%2Fapache.git;a=blobdiff_plain;f=apache-mod_ssl.conf;h=ae1bdc95fa304740abd4c32b809dd9cfec73a463;hp=44a830e0d475444d6483fe67cc0fe272ce2f9276;hb=89f2bfa15d71bd860e0b12ffe999d78cc715e8c0;hpb=90c90df612ee7fed362476fa3c431b405616737d diff --git a/apache-mod_ssl.conf b/apache-mod_ssl.conf index 44a830e..ae1bdc9 100644 --- a/apache-mod_ssl.conf +++ b/apache-mod_ssl.conf @@ -1,4 +1,3 @@ - apache-mod_ssl.conf,v 1.20 2010/07/06 08:18:18 psz Exp $ LoadModule ssl_module modules/mod_ssl.so # This is the Apache server configuration file providing SSL support. @@ -19,6 +18,10 @@ LoadModule ssl_module modules/mod_ssl.so # block. So, if available, use this one instead. Read the mod_ssl User # Manual for more details. # + +SSLRandomSeed startup file:/dev/urandom 256 +SSLRandomSeed connect builtin + #SSLRandomSeed startup file:/dev/random 512 #SSLRandomSeed startup file:/dev/urandom 512 #SSLRandomSeed connect file:/dev/random 512 @@ -55,31 +58,75 @@ SSLPassPhraseDialog builtin SSLSessionCache shmcb:/var/cache/httpd/ssl_scache(512000) SSLSessionCacheTimeout 300 -# Semaphore: -# Configure the path to the mutual exclusion semaphore the -# SSL engine uses internally for inter-process synchronization. -SSLMutex file:/var/run/httpd/ssl_mutex - -## -## SSL Virtual Host Context -## - -NameVirtualHost *:443 - -# SSL Engine Switch: -# Enable/Disable SSL for this virtual host. -SSLEngine on +# 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 -SSLv3 -TLSv1 -TLSv1.1 # 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 + +# High security: no weak ciphers, at least 256 bit +# (except TLS_AES_128_GCM_SHA256 which is required by TLSv1.3) +#SSLCipherSuite HIGH:!aNULL:!AES128:!ARIA128:!CAMELLIA128:!RSA:!SHA:!SHA256:!SHA384 + +# If you don't care about TLSv1.3 requirements and don't want any 128 bit +# cipher you can disable TLS_AES_128_GCM_SHA256 by uncommenting line below +#SSLCipherSuite TLSv1.3 TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384 + +# Strong security: no weak ciphers, at least 128 bit +# Recommended setting if you are not paranoid +SSLCipherSuite HIGH:!aNULL:!RSA:!SHA:!SHA256:!SHA384 + +# Medium security: includes some weak ciphers, at least 256 bit +# (except TLS_AES_128_GCM_SHA256 which is required by TLSv1.3) +#SSLCipherSuite HIGH:!aNULL:!AES128:!ARIA128:!CAMELLIA128:!RSA + +# Low security: includes some weak ciphers, at least 128 bit +#SSLCipherSuite HIGH:!aNULL:!RSA + +SSLHonorCipherOrder on +SSLCompression off +SSLSessionTickets 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 +## + + +# SSL Engine Switch: +# 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 @@ -211,7 +258,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: