From 7216378ff354deb2d32bd7b1b29d7cc2c178f622 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 24 Sep 2018 18:09:03 +0200 Subject: [PATCH 1/1] Redirect every requests on index.bin --- SOURCES/ihttpd.conf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/SOURCES/ihttpd.conf b/SOURCES/ihttpd.conf index beadf23..38f0c01 100644 --- a/SOURCES/ihttpd.conf +++ b/SOURCES/ihttpd.conf @@ -62,16 +62,30 @@ SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLSessionCache shmcb:/run/ihttpd/ssl_scache(512000) SSLProtocol all -SSLv3 -# Redirect to https +# Enable rewrite RewriteEngine On + +# Redirect to https RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] +# Redirect unexisting documents to script +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule .* /index.bin [L] + # SSL vhost + # Enable ssl SSLEngine on SSLCertificateFile /etc/pki/tls/certs/ihttpd.pem SSLCertificateKeyFile /etc/pki/tls/private/ihttpd.pem + + # Inherit rewrite config + RewriteEngine On + RewriteOptions Inherit + + # Set custom log CustomLog "/run/ihttpd/log/https.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" -- 2.41.1