summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:17:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:17:13 +0000
commit4fe291eb349d47ccb529a13bc90f5ae9d38d66f8 (patch)
treeb210ea87cd09dafd2998f2a699db966162947fd5
parentSetting SSLStaplingReturnResponderErrors to off. (diff)
downloadapache2-4fe291eb349d47ccb529a13bc90f5ae9d38d66f8.tar.xz
apache2-4fe291eb349d47ccb529a13bc90f5ae9d38d66f8.zip
Adding configuration file to rewrite http to https.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/config-dir/conf-available/rewrite-http-to-https.conf10
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/config-dir/conf-available/rewrite-http-to-https.conf b/debian/config-dir/conf-available/rewrite-http-to-https.conf
new file mode 100644
index 0000000..c90c2e9
--- /dev/null
+++ b/debian/config-dir/conf-available/rewrite-http-to-https.conf
@@ -0,0 +1,10 @@
+# /etc/apache2/conf-available/rewrite-http-to-https.conf
+
+<IfModule mod_ssl.c>
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+
+ RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
+ RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
+ </IfModule>
+</IfModule>