aboutsummaryrefslogtreecommitdiff
path: root/src/property
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-11-30 16:11:57 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-12-02 17:03:46 -0700
commit7c6eacf3479b12e070ad47107075a33f8a46934c (patch)
tree5d69dfdd8334d4cb67237c0827a26896862fe3f2 /src/property
parentc6313c2170f7149c47cfe64ff2e9ea2c655165e6 (diff)
downloadconsfigurator-7c6eacf3479b12e070ad47107075a33f8a46934c.tar.gz
APACHE:HTTPS-VHOST http->https: use %{SERVER_NAME} & HTTP status 301
The use of %{SERVER_NAME} makes the configuration line a constant value. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r--src/property/apache.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property/apache.lisp b/src/property/apache.lisp
index 4b94107..375d65f 100644
--- a/src/property/apache.lisp
+++ b/src/property/apache.lisp
@@ -135,7 +135,7 @@ Unapplying removes the Apache site config but leaves the certificate behind."
"RewriteEngine On"
"RewriteRule ^/.well-known/acme-challenge.* - [L]"
;; redirect everything else to https
- ,(strcat "RewriteRule ^/(.*) https://" name "/$1 [L,R,NE]")
+ "RewriteRule (.*) https://%{SERVER_NAME}$1 [R=301,L,NE]"
,@additional-config
"</VirtualHost>")))))
(on-change (lets-encrypt:certificate-obtained