From 6927c1c9aaa0175ea45216a033fa8a5d16861d8f Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 22 Nov 2026 13:56:13 +0100 Subject: [PATCH] create_vhost.sh: don't redirect ACME challenges on https-only sites The port 80 vhost of https-only sites redirected everything to https, including /.well-known/acme-challenge/. Let's Encrypt (dehydrated, http-01) then had to follow the redirect to port 443. Exclude the challenge path from the redirect (as already done for redirect sites) and drop the redundant 'RewriteCond %{HTTPS} !=on' on port 80. Co-Authored-By: Claude Opus 5.5 --- create_vhost.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_vhost.sh b/create_vhost.sh index b8b4d22..d9b84e6 100755 --- a/create_vhost.sh +++ b/create_vhost.sh @@ -3261,7 +3261,7 @@ if $_https_only ; then cat <> ${_new_vhost_config_file} RewriteEngine on - RewriteCond %{HTTPS} !=on + RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] EOF elif [ "$_type" = "FCGID" ]; then