X-Git-Url: https://git.rapsys.eu/ihttpd/blobdiff_plain/034a5b59d291e9a01cc9fd6c77aeb1019174e5c6..64325739f20b3372956863b2269a9ed942e2b080:/SOURCES/ihttpd.conf?ds=sidebyside diff --git a/SOURCES/ihttpd.conf b/SOURCES/ihttpd.conf index 02a62b2..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 @@ -19,6 +22,9 @@ AddDefaultCharset UTF-8 # Allow file send EnableSendfile on +# Set timeout +Timeout 600 + # Set document root DocumentRoot "/var/www/html" @@ -56,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"