1 debug.log-request-handling = "enable"
2 debug.log-request-header = "enable"
3 debug.log-response-header = "enable"
4 #debug.log-condition-handling = "enable"
5 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
7 ## 64 Mbyte ... nice limit
8 server.max-request-size = 65000
10 ## bind to port (default: 80)
13 ## bind to localhost (default: all interfaces)
14 server.bind = "localhost"
15 server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
16 server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log"
17 server.name = "www.example.org"
18 server.tag = "Apache 1.3.29"
20 server.dir-listing = "enable"
48 ######################## MODULE CONFIG ############################
54 accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
57 ".png" => "image/png",
58 ".jpg" => "image/jpeg",
59 ".jpeg" => "image/jpeg",
60 ".gif" => "image/gif",
61 ".html" => "text/html",
62 ".htm" => "text/html",
63 ".pdf" => "application/pdf",
64 ".swf" => "application/x-shockwave-flash",
65 ".spl" => "application/futuresplash",
66 ".txt" => "text/plain",
67 ".tar.gz" => "application/x-tgz",
68 ".tgz" => "application/x-tgz",
69 ".gz" => "application/x-gzip",
71 ".conf" => "text/plain",
74 $HTTP["host"] == "cache.example.org" {
75 compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
82 setenv.add-environment = (
83 "TRAC_ENV" => "tracenv",
86 setenv.set-environment = (
89 setenv.add-request-header = (
92 setenv.set-request-header = (
95 setenv.add-response-header = (
98 setenv.set-response-header = (
102 $HTTP["url"] =~ "\.pdf$" {
103 server.range-requests = "disable"
109 "host" => "127.0.0.1",
111 "broken-scriptfilename" => "enable",
112 "allow-x-send-file" => "enable",
114 "/prefix.fcgi" => ( (
115 "host" => "127.0.0.1",
117 "check-local" => "disable",
118 "broken-scriptfilename" => "enable",
122 cgi.local-redir = "enable"
128 userdir.include-user = (
133 $HTTP["host"] == "auth-htpasswd.example.org" {
134 auth.backend = "htpasswd"
137 auth.backend = "plain"
138 auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
140 auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
143 "/server-status" => (
144 "method" => "digest",
145 "realm" => "download archiv",
146 "require" => "group=www|user=jan|host=192.168.2.10",
148 "/server-config" => (
150 "realm" => "download archiv",
151 "require" => "valid-user",
161 "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
162 "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
165 url.rewrite-if-not-file = (
166 "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2",
170 "/expire/access" => "access 2 hours",
171 "/expire/modification" => "access plus 1 seconds 2 minutes",
175 status.status-url = "/server-status"
176 status.config-url = "/server-config"
178 $HTTP["host"] == "vvv.example.org" {
179 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
180 secdownload.secret = "verysecret"
181 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
182 secdownload.uri-prefix = "/sec/"
183 secdownload.timeout = 120
184 secdownload.algorithm = "md5"
187 $HTTP["host"] == "vvv-sha1.example.org" {
188 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
189 secdownload.secret = "verysecret"
190 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
191 secdownload.uri-prefix = "/sec/"
192 secdownload.timeout = 120
193 secdownload.algorithm = "hmac-sha1"
196 $HTTP["host"] == "vvv-sha256.example.org" {
197 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
198 secdownload.secret = "verysecret"
199 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
200 secdownload.uri-prefix = "/sec/"
201 secdownload.timeout = 120
202 secdownload.algorithm = "hmac-sha256"
203 secdownload.hash-querystr = "enable"
206 $HTTP["host"] == "zzz.example.org" {
207 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
208 server.name = "zzz.example.org"
209 static-file.disable-pathinfo = "enable"
212 $HTTP["host"] == "symlink.example.org" {
213 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
214 server.name = "symlink.example.org"
215 server.follow-symlink = "enable"
218 $HTTP["host"] == "nosymlink.example.org" {
219 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
220 server.name = "symlink.example.org"
221 server.follow-symlink = "disable"
224 $HTTP["host"] == "no-simple.example.org" {
225 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
226 server.name = "zzz.example.org"
229 $HTTP["host"] !~ "(no-simple\.example\.org)" {
230 simple-vhost.document-root = "pages"
231 simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
232 simple-vhost.default-host = "www.example.org"
235 $HTTP["host"] == "auth.example.org" {
236 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
237 server.name = "auth.example.org"
238 auth.backend = "htpasswd"
242 "realm" => "download archiv",
243 "require" => "valid-user",
248 $HTTP["host"] =~ "(vvv).example.org" {
250 "^/redirect/$" => "http://localhost:2048/",
254 $HTTP["host"] =~ "(zzz).example.org" {
256 "^/redirect/$" => "http://localhost:2048/%1",
260 $HTTP["host"] =~ "(remoteip)\.example\.org" {
261 $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
263 "^/redirect/$" => "http://localhost:2048/%1",
268 $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
269 $HTTP["host"] =~ "(remoteip2)\.example\.org" {
271 "^/redirect/$" => "http://localhost:2048/%1",
276 $HTTP["host"] =~ "bug255\.example\.org$" {
277 $HTTP["remoteip"] == "127.0.0.1" {
284 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
290 # deny access for all image stealers
291 $HTTP["host"] == "referer.example.org" {
292 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
299 $HTTP["cookie"] =~ "empty-ref" {
300 $HTTP["referer"] == "" {
307 $HTTP["host"] =~ "allow\.example\.org$" {
308 url.access-allow = ( ".txt" ) # allow takes precedence over deny
309 url.access-deny = ( ".txt" )
312 $HTTP["host"] == "etag.example.org" {
313 static-file.etags = "disable"
314 compress.filetype = ()