1debug.log-request-handling = "enable"
2debug.log-request-header = "enable"
3debug.log-response-header = "enable"
4debug.log-condition-handling = "enable"
5server.document-root         = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
6
7## 64 Mbyte ... nice limit
8server.max-request-size = 65000
9
10## bind to port (default: 80)
11server.port                 = 2048
12
13## bind to localhost (default: all interfaces)
14server.bind                = "localhost"
15server.errorlog            = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
16server.breakagelog         = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log"
17server.name                = "www.example.org"
18server.tag                 = "Apache 1.3.29"
19
20server.dir-listing          = "enable"
21
22#server.event-handler        = "linux-sysepoll"
23#server.event-handler        = "linux-rtsig"
24
25#server.modules.path         = ""
26server.modules              = (
27				"mod_rewrite",
28				"mod_setenv",
29				"mod_secdownload",
30			        "mod_access",
31				"mod_auth",
32#				"mod_httptls",
33				"mod_status",
34				"mod_expire",
35				"mod_simple_vhost",
36				"mod_redirect",
37#				"mod_evhost",
38#				"mod_localizer",
39				"mod_fastcgi",
40				"mod_cgi",
41				"mod_compress",
42				"mod_userdir",
43				"mod_ssi",
44				"mod_accesslog" )
45
46server.indexfiles           = ( "index.php", "index.html",
47                                "index.htm", "default.htm" )
48
49
50######################## MODULE CONFIG ############################
51
52ssi.extension = ( ".shtml" )
53
54accesslog.filename          = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
55
56mimetype.assign             = ( ".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",
69				".c"    => "text/plain",
70				".conf" => "text/plain" )
71
72$HTTP["host"] == "cache.example.org" {
73  compress.cache-dir          = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
74}
75compress.filetype           = ("text/plain", "text/html")
76
77setenv.add-environment      = ( "TRAC_ENV" => "tracenv", "SETENV" => "setenv")
78setenv.add-request-header   = ( "FOO" => "foo")
79setenv.add-response-header  = ( "BAR" => "foo")
80
81$HTTP["url"] =~ "\.pdf$" {
82  server.range-requests = "disable"
83}
84
85fastcgi.debug               = 0
86fastcgi.server              = ( ".php" =>        ( ( "host" => "127.0.0.1", "port" => 1026, "broken-scriptfilename" => "enable", "allow-x-send-file" => "enable" ) ),
87			        "/prefix.fcgi" => ( ( "host" => "127.0.0.1", "port" => 1026, "check-local" => "disable", "broken-scriptfilename" => "enable" ) )
88			      )
89
90
91cgi.assign                  = ( ".pl"  => "/usr/bin/perl",
92                                ".cgi" => "/usr/bin/perl",
93				".py"  => "/usr/bin/python" )
94
95userdir.include-user = ( "jan" )
96userdir.path = "/"
97
98ssl.engine                  = "disable"
99# ssl.pemfile                 = "server.pem"
100
101$HTTP["host"] == "auth-htpasswd.example.org" {
102	auth.backend                = "htpasswd"
103}
104
105auth.backend                = "plain"
106auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
107
108auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
109
110
111auth.require                = ( "/server-status" =>
112                                (
113				  "method"  => "digest",
114				  "realm"   => "download archiv",
115				  "require" => "group=www|user=jan|host=192.168.2.10"
116				),
117				"/server-config" =>
118                                (
119				  "method"  => "basic",
120				  "realm"   => "download archiv",
121				  "require" => "valid-user"
122				)
123                              )
124
125url.access-deny             = ( "~", ".inc")
126
127url.rewrite		    = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
128				"^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1" )
129
130url.rewrite-if-not-file = ( "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2" )
131
132expire.url                  = ( "/expire/access" => "access 2 hours",
133				"/expire/modification" => "access plus 1 seconds 2 minutes")
134
135#cache.cache-dir             = "/home/weigon/wwwroot/cache/"
136
137#### status module
138status.status-url           = "/server-status"
139status.config-url           = "/server-config"
140
141$HTTP["host"] == "vvv.example.org" {
142  server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
143  secdownload.secret          = "verysecret"
144  secdownload.document-root   = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
145  secdownload.uri-prefix      = "/sec/"
146  secdownload.timeout         = 120
147}
148
149$HTTP["host"] == "zzz.example.org" {
150  server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
151  server.name = "zzz.example.org"
152  static-file.disable-pathinfo = "enable"
153}
154
155$HTTP["host"] == "symlink.example.org" {
156  server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
157  server.name = "symlink.example.org"
158  server.follow-symlink = "enable"
159}
160
161$HTTP["host"] == "nosymlink.example.org" {
162  server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
163  server.name = "symlink.example.org"
164  server.follow-symlink = "disable"
165}
166
167$HTTP["host"] == "no-simple.example.org" {
168  server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
169  server.name = "zzz.example.org"
170}
171
172$HTTP["host"] !~ "(no-simple\.example\.org)" {
173  simple-vhost.document-root  = "pages"
174  simple-vhost.server-root    = env.SRCDIR + "/tmp/lighttpd/servers/"
175  simple-vhost.default-host   = "www.example.org"
176}
177
178$HTTP["host"] == "auth.example.org" {
179  server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
180  server.name = "auth.example.org"
181  auth.backend                = "htpasswd"
182  auth.require                = ( "" =>
183                                (
184                                  "method"  => "basic",
185                                  "realm"   => "download archiv",
186                                  "require" => "valid-user"
187                                )
188                              )
189}
190
191$HTTP["host"] =~ "(vvv).example.org" {
192  url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
193}
194
195$HTTP["host"] =~ "(zzz).example.org" {
196  url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" )
197}
198
199$HTTP["host"] =~ "(remoteip)\.example\.org" {
200  $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
201    url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" )
202  }
203}
204
205$HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
206  $HTTP["host"] =~ "(remoteip2)\.example\.org" {
207    url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" )
208  }
209}
210
211$HTTP["host"] =~ "bug255\.example\.org$" {
212  $HTTP["remoteip"] == "127.0.0.1" {
213    url.access-deny = ( "" )
214  }
215}
216
217$HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
218  url.access-deny = ( ".jpg" )
219}
220
221# deny access for all image stealers
222$HTTP["host"] == "referer.example.org" {
223  $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
224    url.access-deny = ( ".png" )
225  }
226}
227
228$HTTP["cookie"] =~ "empty-ref" {
229  $HTTP["referer"] == "" {
230    url.access-deny = ( "" )
231  }
232}
233
234
235$HTTP["host"] == "etag.example.org" {
236    static-file.etags = "disable"
237    compress.filetype = ()
238}
239