beadf2363d40914194f78711c4bab0f4d17574dc
[ihttpd] / SOURCES / ihttpd.conf
1 # Fix server root
2 #XXX: useless now ???
3 ServerRoot "/etc"
4
5 # Listen on port 80 and 443
6 Listen 80
7 Listen 443
8
9 # Server name
10 ServerName localhost
11
12 # Server admin
13 ServerAdmin root@localhost
14
15 # Fix user
16 User root
17 Group root
18
19 # Send charset
20 AddDefaultCharset UTF-8
21
22 # Allow file send
23 EnableSendfile on
24
25 # Set timeout
26 Timeout 600
27
28 # Set document root
29 DocumentRoot "/var/www/html"
30
31 <Directory />
32 AllowOverride None
33 </Directory>
34 <Directory "/run/ihttpd/log">
35 AllowOverride None
36 Require all granted
37 </Directory>
38 <Directory "/var/www/html">
39 AllowOverride None
40 Options Indexes FollowSymLinks ExecCGI
41 Require all granted
42 DirectoryIndex index.bin
43 AddHandler cgi-script .bin
44 </Directory>
45
46 # Fix mime type file location
47 TypesConfig /etc/mime.types
48
49 # Fix pid location
50 PidFile /run/ihttpd/ihttpd.pid
51
52 # Fix dir for rewrite map lock files
53 Mutex file:/run/ihttpd rewrite-map
54 Mutex file:/run/ihttpd mpm-accept
55
56 # Disable version info
57 ServerSignature Off
58 ServerTokens Prod
59
60 # SSL configuration
61 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
62 SSLSessionCache shmcb:/run/ihttpd/ssl_scache(512000)
63 SSLProtocol all -SSLv3
64
65 # Redirect to https
66 RewriteEngine On
67 RewriteCond %{HTTPS} !=on
68 RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
69
70 # SSL vhost
71 <VirtualHost *:443>
72 SSLEngine on
73 SSLCertificateFile /etc/pki/tls/certs/ihttpd.pem
74 SSLCertificateKeyFile /etc/pki/tls/private/ihttpd.pem
75 CustomLog "/run/ihttpd/log/https.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
76 </VirtualHost>
77
78 # Log section
79 ErrorLog "/run/ihttpd/log/error.log"
80 LogLevel warn
81
82 <IfModule log_config_module>
83 CustomLog "/run/ihttpd/log/http.log" "%h %l %u %t \"%r\" %>s %b"
84 </IfModule>