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.add-request-header = (
89 setenv.add-response-header = (
93 $HTTP["url"] =~ "\.pdf$" {
94 server.range-requests = "disable"
100 "host" => "127.0.0.1",
102 "broken-scriptfilename" => "enable",
103 "allow-x-send-file" => "enable",
105 "/prefix.fcgi" => ( (
106 "host" => "127.0.0.1",
108 "check-local" => "disable",
109 "broken-scriptfilename" => "enable",
118 userdir.include-user = (
123 $HTTP["host"] == "auth-htpasswd.example.org" {
124 auth.backend = "htpasswd"
127 auth.backend = "plain"
128 auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
130 auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
133 "/server-status" => (
134 "method" => "digest",
135 "realm" => "download archiv",
136 "require" => "group=www|user=jan|host=192.168.2.10",
138 "/server-config" => (
140 "realm" => "download archiv",
141 "require" => "valid-user",
151 "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
152 "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
155 url.rewrite-if-not-file = (
156 "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2",
160 "/expire/access" => "access 2 hours",
161 "/expire/modification" => "access plus 1 seconds 2 minutes",
165 status.status-url = "/server-status"
166 status.config-url = "/server-config"
168 $HTTP["host"] == "vvv.example.org" {
169 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
170 secdownload.secret = "verysecret"
171 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
172 secdownload.uri-prefix = "/sec/"
173 secdownload.timeout = 120
174 secdownload.algorithm = "md5"
177 $HTTP["host"] == "vvv-sha1.example.org" {
178 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
179 secdownload.secret = "verysecret"
180 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
181 secdownload.uri-prefix = "/sec/"
182 secdownload.timeout = 120
183 secdownload.algorithm = "hmac-sha1"
186 $HTTP["host"] == "vvv-sha256.example.org" {
187 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
188 secdownload.secret = "verysecret"
189 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
190 secdownload.uri-prefix = "/sec/"
191 secdownload.timeout = 120
192 secdownload.algorithm = "hmac-sha256"
195 $HTTP["host"] == "zzz.example.org" {
196 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
197 server.name = "zzz.example.org"
198 static-file.disable-pathinfo = "enable"
201 $HTTP["host"] == "symlink.example.org" {
202 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
203 server.name = "symlink.example.org"
204 server.follow-symlink = "enable"
207 $HTTP["host"] == "nosymlink.example.org" {
208 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
209 server.name = "symlink.example.org"
210 server.follow-symlink = "disable"
213 $HTTP["host"] == "no-simple.example.org" {
214 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
215 server.name = "zzz.example.org"
218 $HTTP["host"] !~ "(no-simple\.example\.org)" {
219 simple-vhost.document-root = "pages"
220 simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
221 simple-vhost.default-host = "www.example.org"
224 $HTTP["host"] == "auth.example.org" {
225 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
226 server.name = "auth.example.org"
227 auth.backend = "htpasswd"
231 "realm" => "download archiv",
232 "require" => "valid-user",
237 $HTTP["host"] =~ "(vvv).example.org" {
239 "^/redirect/$" => "http://localhost:2048/",
243 $HTTP["host"] =~ "(zzz).example.org" {
245 "^/redirect/$" => "http://localhost:2048/%1",
249 $HTTP["host"] =~ "(remoteip)\.example\.org" {
250 $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
252 "^/redirect/$" => "http://localhost:2048/%1",
257 $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
258 $HTTP["host"] =~ "(remoteip2)\.example\.org" {
260 "^/redirect/$" => "http://localhost:2048/%1",
265 $HTTP["host"] =~ "bug255\.example\.org$" {
266 $HTTP["remoteip"] == "127.0.0.1" {
273 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
279 # deny access for all image stealers
280 $HTTP["host"] == "referer.example.org" {
281 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
288 $HTTP["cookie"] =~ "empty-ref" {
289 $HTTP["referer"] == "" {
296 $HTTP["host"] =~ "allow\.example\.org$" {
297 url.access-allow = ( ".txt" ) # allow takes precedence over deny
298 url.access-deny = ( ".txt" )
301 $HTTP["host"] == "etag.example.org" {
302 static-file.etags = "disable"
303 compress.filetype = ()