diff options
author | Jonas Smedegaard <dr@jones.dk> | 2020-10-11 19:40:16 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2020-10-11 19:40:16 +0200 |
commit | 8ff26974e6fced7d41412e56849c00269b61bece (patch) | |
tree | 189fea47a196bc4076a397a1e78486057b023a19 /apache2/conf-available/local-ssl.conf | |
parent | 43473d2f9baf18dde0cef951e77a4f8ef62a979b (diff) |
ensure TLS settings are applied only when both wanted and possible
Diffstat (limited to 'apache2/conf-available/local-ssl.conf')
-rw-r--r-- | apache2/conf-available/local-ssl.conf | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apache2/conf-available/local-ssl.conf b/apache2/conf-available/local-ssl.conf index 8e30d50..7b2cabf 100644 --- a/apache2/conf-available/local-ssl.conf +++ b/apache2/conf-available/local-ssl.conf @@ -10,6 +10,8 @@ </IfDefine> </IfDefine> +<IfDefine _TLSHOST> + <If "%{HTTPS} == 'off'"> RedirectMatch permanent ^(?!/.well-known/)(.*) https://${_HOST}/$1 </If> @@ -22,6 +24,7 @@ </IfDefine> </IfModule> +<IfModule mod_ssl.c> <IfModule !mod_gnutls.c> SSLEngine on <IfDefine _TLS_KEY> @@ -36,3 +39,6 @@ SSLOptions +StdEnvVars </Directory> </IfModule> +</IfModule> + +</IfModule> # _TLSHOST |