X-Git-Url: https://git.rapsys.eu/ihttpd/blobdiff_plain/f0d564bb8fa08ec919c83f55a51ec443344b7801..1508cd8949e4d0438690aae7abad41591712796d:/SOURCES/ihttpd.conf diff --git a/SOURCES/ihttpd.conf b/SOURCES/ihttpd.conf index 2286c1e..38f0c01 100644 --- a/SOURCES/ihttpd.conf +++ b/SOURCES/ihttpd.conf @@ -6,6 +6,9 @@ ServerRoot "/etc" Listen 80 Listen 443 +# Server name +ServerName localhost + # Server admin ServerAdmin root@localhost @@ -59,17 +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 - ServerName localhost + # 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"