diff options
| author | Jonas Smedegaard <dr@jones.dk> | 2025-10-21 12:38:30 +0200 |
|---|---|---|
| committer | Jonas Smedegaard <dr@jones.dk> | 2025-10-21 12:38:30 +0200 |
| commit | 81e5cdfea08dfc1b0dd3c744b3706b4252607b3d (patch) | |
| tree | 0b8c000363387a24ca98a9b55da6e4a47c623bd1 | |
| parent | 216d482a634458c1a44c4e31557ab89dd0b3138e (diff) | |
cover non-https vhost; slightly relax path patch
| -rw-r--r-- | apache2/conf-available/local-alias-redirect.conf | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apache2/conf-available/local-alias-redirect.conf b/apache2/conf-available/local-alias-redirect.conf index e04fe29..0437d61 100644 --- a/apache2/conf-available/local-alias-redirect.conf +++ b/apache2/conf-available/local-alias-redirect.conf @@ -1,3 +1,6 @@ -<If "%{HTTP_HOST} != %{SERVER_NAME}"> - RedirectMatch permanent ^(?!/.well-known/acme-challenge/)(.*) https://${_HOST}$1 -</If> + <IfDefine _TLS_HOST> + RedirectMatch permanent ^(?!/.well-known/acme-challenge)(.*) https://${_HOST}$1 + </IfDefine> + <IfDefine !_TLS_HOST> + RedirectMatch permanent ^(?!/.well-known/acme-challenge)(.*) http://${_HOST}$1 + </IfDefine> |
