diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 21:49:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 21:49:24 +0000 |
commit | c6aa475495b82bea20899fe90b485c14425182f9 (patch) | |
tree | ed2e4bfeaf45e75f900493a888d4d55f13eb8a4f | |
parent | Setting SSLStaplingReturnResponderErrors to off. (diff) | |
download | apache2-c6aa475495b82bea20899fe90b485c14425182f9.tar.xz apache2-c6aa475495b82bea20899fe90b485c14425182f9.zip |
Adding configuration file to rewrite http to https.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/config-dir/conf-available/rewrite-http-to-https.conf | 10 |
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> |