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"
47 ######################## MODULE CONFIG ############################
53 accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
56 ".png" => "image/png",
57 ".jpg" => "image/jpeg",
58 ".jpeg" => "image/jpeg",
59 ".gif" => "image/gif",
60 ".html" => "text/html",
61 ".htm" => "text/html",
62 ".pdf" => "application/pdf",
63 ".swf" => "application/x-shockwave-flash",
64 ".spl" => "application/futuresplash",
65 ".txt" => "text/plain",
66 ".tar.gz" => "application/x-tgz",
67 ".tgz" => "application/x-tgz",
68 ".gz" => "application/x-gzip",
70 ".conf" => "text/plain",
73 $HTTP["host"] == "cache.example.org" {
74 compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
81 setenv.add-environment = (
82 "TRAC_ENV" => "tracenv",
85 setenv.add-request-header = (
88 setenv.add-response-header = (
92 $HTTP["url"] =~ "\.pdf$" {
93 server.range-requests = "disable"
99 "host" => "127.0.0.1",
101 "broken-scriptfilename" => "enable",
102 "allow-x-send-file" => "enable",
104 "/prefix.fcgi" => ( (
105 "host" => "127.0.0.1",
107 "check-local" => "disable",
108 "broken-scriptfilename" => "enable",
117 userdir.include-user = (
122 $HTTP["host"] == "auth-htpasswd.example.org" {
123 auth.backend = "htpasswd"
126 auth.backend = "plain"
127 auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
129 auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
132 "/server-status" => (
133 "method" => "digest",
134 "realm" => "download archiv",
135 "require" => "group=www|user=jan|host=192.168.2.10",
137 "/server-config" => (
139 "realm" => "download archiv",
140 "require" => "valid-user",
150 "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
151 "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
154 url.rewrite-if-not-file = (
155 "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2",
159 "/expire/access" => "access 2 hours",
160 "/expire/modification" => "access plus 1 seconds 2 minutes",
164 status.status-url = "/server-status"
165 status.config-url = "/server-config"
167 $HTTP["host"] == "vvv.example.org" {
168 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
169 secdownload.secret = "verysecret"
170 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
171 secdownload.uri-prefix = "/sec/"
172 secdownload.timeout = 120
173 secdownload.algorithm = "md5"
176 $HTTP["host"] == "vvv-sha1.example.org" {
177 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
178 secdownload.secret = "verysecret"
179 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
180 secdownload.uri-prefix = "/sec/"
181 secdownload.timeout = 120
182 secdownload.algorithm = "hmac-sha1"
185 $HTTP["host"] == "vvv-sha256.example.org" {
186 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
187 secdownload.secret = "verysecret"
188 secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
189 secdownload.uri-prefix = "/sec/"
190 secdownload.timeout = 120
191 secdownload.algorithm = "hmac-sha256"
194 $HTTP["host"] == "zzz.example.org" {
195 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
196 server.name = "zzz.example.org"
197 static-file.disable-pathinfo = "enable"
200 $HTTP["host"] == "symlink.example.org" {
201 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
202 server.name = "symlink.example.org"
203 server.follow-symlink = "enable"
206 $HTTP["host"] == "nosymlink.example.org" {
207 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
208 server.name = "symlink.example.org"
209 server.follow-symlink = "disable"
212 $HTTP["host"] == "no-simple.example.org" {
213 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
214 server.name = "zzz.example.org"
217 $HTTP["host"] !~ "(no-simple\.example\.org)" {
218 simple-vhost.document-root = "pages"
219 simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
220 simple-vhost.default-host = "www.example.org"
223 $HTTP["host"] == "auth.example.org" {
224 server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
225 server.name = "auth.example.org"
226 auth.backend = "htpasswd"
230 "realm" => "download archiv",
231 "require" => "valid-user",
236 $HTTP["host"] =~ "(vvv).example.org" {
238 "^/redirect/$" => "http://localhost:2048/",
242 $HTTP["host"] =~ "(zzz).example.org" {
244 "^/redirect/$" => "http://localhost:2048/%1",
248 $HTTP["host"] =~ "(remoteip)\.example\.org" {
249 $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
251 "^/redirect/$" => "http://localhost:2048/%1",
256 $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
257 $HTTP["host"] =~ "(remoteip2)\.example\.org" {
259 "^/redirect/$" => "http://localhost:2048/%1",
264 $HTTP["host"] =~ "bug255\.example\.org$" {
265 $HTTP["remoteip"] == "127.0.0.1" {
272 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
278 # deny access for all image stealers
279 $HTTP["host"] == "referer.example.org" {
280 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
287 $HTTP["cookie"] =~ "empty-ref" {
288 $HTTP["referer"] == "" {
295 $HTTP["host"] =~ "allow\.example\.org$" {
296 url.access-allow = ( ".txt" ) # allow takes precedence over deny
297 url.access-deny = ( ".txt" )
300 $HTTP["host"] == "etag.example.org" {
301 static-file.etags = "disable"
302 compress.filetype = ()