annotate lighttpd/lighttpd.conf @ 36:09ef92dc4439

Remove the static high score page. Don't create it, change all links, and redirect any requests.
author John "Elwin" Edwards
date Fri, 03 Jan 2014 13:02:29 -0500
parents e8f3b7994d88
children b1d3a618c254
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
1 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
2 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
3 ## /etc/lighttpd/lighttpd.conf
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
4 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
5 ## check /etc/lighttpd/conf.d/*.conf for the configuration of modules.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
6 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
7 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
8
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
9 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
10 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
11 ## Some Variable definition which will make chrooting easier.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
12 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
13 ## if you add a variable here. Add the corresponding variable in the
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
14 ## chroot example aswell.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
15 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
16 var.log_root = "/var/log/lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
17 var.server_root = "/var/www"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
18 var.state_dir = "/var/run"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
19 var.home_dir = "/var/lib/lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
20 var.conf_dir = "/etc/lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
21
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
22 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
23 ## run the server chrooted.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
24 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
25 ## This requires root permissions during startup.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
26 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
27 ## If you run Chrooted set the the variables to directories relative to
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
28 ## the chroot dir.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
29 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
30 ## example chroot configuration:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
31 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
32 #var.log_root = "/logs"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
33 #var.server_root = "/"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
34 #var.state_dir = "/run"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
35 #var.home_dir = "/lib/lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
36 #var.vhosts_dir = "/vhosts"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
37 #var.conf_dir = "/etc"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
38 #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
39 #server.chroot = "/srv/www"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
40
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
41 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
42 ## Some additional variables to make the configuration easier
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
43 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
44
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
45 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
46 ## Base directory for all virtual hosts
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
47 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
48 ## used in:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
49 ## conf.d/evhost.conf
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
50 ## conf.d/simple_vhost.conf
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
51 ## vhosts.d/vhosts.template
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
52 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
53 var.vhosts_dir = server_root + "/vhosts"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
54
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
55 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
56 ## Cache for mod_compress
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
57 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
58 ## used in:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
59 ## conf.d/compress.conf
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
60 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
61 var.cache_dir = "/var/cache/lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
62
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
63 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
64 ## Base directory for sockets.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
65 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
66 ## used in:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
67 ## conf.d/fastcgi.conf
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
68 ## conf.d/scgi.conf
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
69 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
70 var.socket_dir = home_dir + "/sockets"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
71
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
72 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
73 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
74
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
75 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
76 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
77 ## Load the modules.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
78 include "modules.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
79
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
80 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
81 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
82
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
83 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
84 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
85 ## Basic Configuration
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
86 ## ---------------------
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
87 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
88 server.port = 80
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
89
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
90 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
91 ## Use IPv6?
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
92 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
93 server.use-ipv6 = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
94
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
95 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
96 ## bind to a specific IP
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
97 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
98 #server.bind = "localhost"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
99
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
100 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
101 ## Run as a different username/groupname.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
102 ## This requires root permissions during startup.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
103 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
104 server.username = "lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
105 server.groupname = "lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
106
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
107 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
108 ## enable core files.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
109 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
110 #server.core-files = "disable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
111
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
112 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
113 ## Document root
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
114 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
115 server.document-root = server_root + "/lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
116
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
117 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
118 ## The value for the "Server:" response field.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
119 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
120 ## It would be nice to keep it at "lighttpd".
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
121 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
122 #server.tag = "lighttpd"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
123
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
124 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
125 ## store a pid file
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
126 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
127 server.pid-file = state_dir + "/lighttpd.pid"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
128
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
129 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
130 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
131
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
132 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
133 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
134 ## Logging Options
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
135 ## ------------------
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
136 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
137 ## all logging options can be overwritten per vhost.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
138 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
139 ## Path to the error log file
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
140 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
141 server.errorlog = log_root + "/error.log"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
142
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
143 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
144 ## If you want to log to syslog you have to unset the
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
145 ## server.errorlog setting and uncomment the next line.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
146 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
147 #server.errorlog-use-syslog = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
148
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
149 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
150 ## Access log config
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
151 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
152 include "conf.d/access_log.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
153
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
154 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
155 ## The debug options are moved into their own file.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
156 ## see conf.d/debug.conf for various options for request debugging.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
157 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
158 include "conf.d/debug.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
159
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
160 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
161 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
162
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
163 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
164 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
165 ## Tuning/Performance
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
166 ## --------------------
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
167 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
168 ## corresponding documentation:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
169 ## http://www.lighttpd.net/documentation/performance.html
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
170 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
171 ## set the event-handler (read the performance section in the manual)
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
172 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
173 ## possible options on linux are:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
174 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
175 ## select
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
176 ## poll
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
177 ## linux-sysepoll
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
178 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
179 ## linux-sysepoll is recommended on kernel 2.6.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
180 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
181 server.event-handler = "linux-sysepoll"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
182
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
183 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
184 ## The basic network interface for all platforms at the syscalls read()
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
185 ## and write(). Every modern OS provides its own syscall to help network
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
186 ## servers transfer files as fast as possible
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
187 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
188 ## linux-sendfile - is recommended for small files.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
189 ## writev - is recommended for sending many large files
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
190 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
191 server.network-backend = "linux-sendfile"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
192
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
193 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
194 ## As lighttpd is a single-threaded server, its main resource limit is
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
195 ## the number of file descriptors, which is set to 1024 by default (on
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
196 ## most systems).
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
197 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
198 ## If you are running a high-traffic site you might want to increase this
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
199 ## limit by setting server.max-fds.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
200 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
201 ## Changing this setting requires root permissions on startup. see
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
202 ## server.username/server.groupname.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
203 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
204 ## By default lighttpd would not change the operation system default.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
205 ## But setting it to 2048 is a better default for busy servers.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
206 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
207 ## With SELinux enabled, this is denied by default and needs to be allowed
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
208 ## by running the following once : setsebool -P httpd_setrlimit on
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
209 #server.max-fds = 2048
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
210
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
211 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
212 ## Stat() call caching.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
213 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
214 ## lighttpd can utilize FAM/Gamin to cache stat call.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
215 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
216 ## possible values are:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
217 ## disable, simple or fam.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
218 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
219 server.stat-cache-engine = "simple"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
220
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
221 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
222 ## Fine tuning for the request handling
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
223 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
224 ## max-connections == max-fds/2 (maybe /3)
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
225 ## means the other file handles are used for fastcgi/files
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
226 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
227 server.max-connections = 1024
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
228
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
229 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
230 ## How many seconds to keep a keep-alive connection open,
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
231 ## until we consider it idle.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
232 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
233 ## Default: 5
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
234 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
235 #server.max-keep-alive-idle = 5
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
236
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
237 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
238 ## How many keep-alive requests until closing the connection.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
239 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
240 ## Default: 16
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
241 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
242 #server.max-keep-alive-requests = 16
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
243
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
244 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
245 ## Maximum size of a request in kilobytes.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
246 ## By default it is unlimited (0).
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
247 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
248 ## Uploads to your server cant be larger than this value.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
249 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
250 #server.max-request-size = 0
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
251
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
252 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
253 ## Time to read from a socket before we consider it idle.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
254 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
255 ## Default: 60
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
256 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
257 #server.max-read-idle = 60
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
258
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
259 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
260 ## Time to write to a socket before we consider it idle.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
261 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
262 ## Default: 360
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
263 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
264 #server.max-write-idle = 360
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
265
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
266 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
267 ## Traffic Shaping
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
268 ## -----------------
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
269 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
270 ## see /usr/share/doc/lighttpd/traffic-shaping.txt
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
271 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
272 ## Values are in kilobyte per second.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
273 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
274 ## Keep in mind that a limit below 32kB/s might actually limit the
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
275 ## traffic to 32kB/s. This is caused by the size of the TCP send
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
276 ## buffer.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
277 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
278 ## per server:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
279 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
280 #server.kbytes-per-second = 128
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
281
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
282 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
283 ## per connection:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
284 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
285 #connection.kbytes-per-second = 32
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
286
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
287 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
288 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
289
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
290 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
291 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
292 ## Filename/File handling
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
293 ## ------------------------
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
294
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
295 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
296 ## files to check for if .../ is requested
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
297 ## index-file.names = ( "index.php", "index.rb", "index.html",
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
298 ## "index.htm", "default.htm" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
299 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
300 #index-file.names += (
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
301 # "index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
302 #)
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
303 index-file.names += (
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
304 "index.xhtml", "index.html", "index.htm", "default.htm", "index.php",
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
305 "index.cgi"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
306 )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
307
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
308 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
309 ## deny access the file-extensions
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
310 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
311 ## ~ is for backupfiles from vi, emacs, joe, ...
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
312 ## .inc is often used for code includes which should in general not be part
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
313 ## of the document-root
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
314 url.access-deny = ( "~", ".inc" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
315
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
316 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
317 ## disable range requests for pdf files
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
318 ## workaround for a bug in the Acrobat Reader plugin.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
319 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
320 $HTTP["url"] =~ "\.pdf$" {
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
321 server.range-requests = "disable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
322 }
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
323
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
324 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
325 ## url handling modules (rewrite, redirect)
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
326 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
327 #url.rewrite = ( "^/$" => "/server-status" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
328 #url.redirect = ( "^/wishlist/(.+)" => "http://www.example.com/$1" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
329
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
330 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
331 ## both rewrite/redirect support back reference to regex conditional using %n
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
332 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
333 #$HTTP["host"] =~ "^www\.(.*)" {
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
334 # url.redirect = ( "^/(.*)" => "http://%1/$1" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
335 #}
36
09ef92dc4439 Remove the static high score page.
John "Elwin" Edwards
parents: 30
diff changeset
336 $HTTP["host"] =~ "^(.*)$" {
09ef92dc4439 Remove the static high score page.
John "Elwin" Edwards
parents: 30
diff changeset
337 url.redirect = (
09ef92dc4439 Remove the static high score page.
John "Elwin" Edwards
parents: 30
diff changeset
338 "^/scoring/highscores.html" => "http://%1/scoring/high.cgi?l=40"
09ef92dc4439 Remove the static high score page.
John "Elwin" Edwards
parents: 30
diff changeset
339 )
09ef92dc4439 Remove the static high score page.
John "Elwin" Edwards
parents: 30
diff changeset
340 }
26
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
341
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
342 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
343 ## which extensions should not be handle via static-file transfer
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
344 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
345 ## .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
346 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
347 #static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
348 static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi", ".py", ".scgi" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
349
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
350 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
351 ## error-handler for status 404
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
352 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
353 #server.error-handler-404 = "/error-handler.html"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
354 #server.error-handler-404 = "/error-handler.php"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
355 server.error-handler-404 = "404.html"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
356
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
357 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
358 ## Format: <errorfile-prefix><status-code>.html
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
359 ## -> ..../status-404.html for 'File not found'
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
360 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
361 #server.errorfile-prefix = "/srv/www/htdocs/errors/status-"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
362
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
363 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
364 ## mimetype mapping
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
365 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
366 include "conf.d/mime.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
367
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
368 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
369 ## directory listing configuration
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
370 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
371 include "conf.d/dirlisting.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
372
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
373 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
374 ## Should lighttpd follow symlinks?
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
375 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
376 server.follow-symlink = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
377
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
378 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
379 ## force all filenames to be lowercase?
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
380 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
381 #server.force-lowercase-filenames = "disable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
382
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
383 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
384 ## defaults to /var/tmp as we assume it is a local harddisk
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
385 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
386 server.upload-dirs = ( "/var/tmp" )
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
387
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
388 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
389 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
390
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
391
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
392 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
393 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
394 ## SSL Support
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
395 ## -------------
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
396 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
397 ## To enable SSL for the whole server you have to provide a valid
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
398 ## certificate and have to enable the SSL engine.::
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
399 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
400 ## ssl.engine = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
401 ## ssl.pemfile = "/path/to/server.pem"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
402 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
403 ## The HTTPS protocol does not allow you to use name-based virtual
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
404 ## hosting with SSL. If you want to run multiple SSL servers with
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
405 ## one lighttpd instance you must use IP-based virtual hosting: ::
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
406 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
407 ## $SERVER["socket"] == "10.0.0.1:443" {
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
408 ## ssl.engine = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
409 ## ssl.pemfile = "/etc/ssl/private/www.example.com.pem"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
410 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
411 ## # Mitigate BEAST attack:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
412 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
413 ## # A stricter base cipher suite. For details see:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
414 ## # http://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
415 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
416 ## ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
417 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
418 ## # Make the server prefer the order of the server side cipher suite instead of the client suite.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
419 ## # This is necessary to mitigate the BEAST attack (unless you disable all non RC4 algorithms).
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
420 ## # This option is enabled by default, but only used if ssl.cipher-list is set.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
421 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
422 ## # ssl.honor-cipher-order = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
423 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
424 ## # Mitigate CVE-2009-3555 by disabling client triggered renegotation
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
425 ## # This is enabled by default.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
426 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
427 ## # ssl.disable-client-renegotiation = "enable"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
428 ## #
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
429 ## server.name = "www.example.com"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
430 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
431 ## server.document-root = "/srv/www/vhosts/example.com/www/"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
432 ## }
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
433 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
434
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
435 ## If you have a .crt and a .key file, cat them together into a
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
436 ## single PEM file:
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
437 ## $ cat /etc/ssl/private/lighttpd.key /etc/ssl/certs/lighttpd.crt \
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
438 ## > /etc/ssl/private/lighttpd.pem
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
439 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
440 #ssl.pemfile = "/etc/ssl/private/lighttpd.pem"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
441
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
442 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
443 ## optionally pass the CA certificate here.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
444 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
445 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
446 #ssl.ca-file = ""
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
447
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
448 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
449 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
450
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
451 #######################################################################
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
452 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
453 ## custom includes like vhosts.
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
454 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
455 #include "conf.d/config.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
456 #include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
457 ##
b003235abe75 Add lighttpd configuration files.
John "Elwin" Edwards
parents:
diff changeset
458 #######################################################################
30
e8f3b7994d88 Port to Python 3.
John "Elwin" Edwards
parents: 26
diff changeset
459
e8f3b7994d88 Port to Python 3.
John "Elwin" Edwards
parents: 26
diff changeset
460 setenv.add-environment = (
e8f3b7994d88 Port to Python 3.
John "Elwin" Edwards
parents: 26
diff changeset
461 "LC_CTYPE" => "en_US.utf8"
e8f3b7994d88 Port to Python 3.
John "Elwin" Edwards
parents: 26
diff changeset
462 )