]> Raphaƫl G. Git Repositories - ihttpd/blob - SOURCES/ihttpd.conf
Redirect every requests on index.bin
[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 # Enable rewrite
66 RewriteEngine On
67
68 # Redirect to https
69 RewriteCond %{HTTPS} !=on
70 RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
71
72 # Redirect unexisting documents to script
73 RewriteCond %{REQUEST_FILENAME} !-f
74 RewriteCond %{REQUEST_FILENAME} !-d
75 RewriteRule .* /index.bin [L]
76
77 # SSL vhost
78 <VirtualHost *:443>
79 # Enable ssl
80 SSLEngine on
81 SSLCertificateFile /etc/pki/tls/certs/ihttpd.pem
82 SSLCertificateKeyFile /etc/pki/tls/private/ihttpd.pem
83
84 # Inherit rewrite config
85 RewriteEngine On
86 RewriteOptions Inherit
87
88 # Set custom log
89 CustomLog "/run/ihttpd/log/https.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
90 </VirtualHost>
91
92 # Log section
93 ErrorLog "/run/ihttpd/log/error.log"
94 LogLevel warn
95
96 <IfModule log_config_module>
97 CustomLog "/run/ihttpd/log/http.log" "%h %l %u %t \"%r\" %>s %b"
98 </IfModule>