- next is 1.4.56
[lighttpd.git] / tests / lighttpd.conf
blob4c8f9677f29cf52611de3efc7826ea5841934bd5
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)
11 server.port                 = 2048
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"
22 server.modules = (
23         "mod_setenv",
24         "mod_access",
25         "mod_expire",
26         "mod_simple_vhost",
27         "mod_cgi",
28         "mod_userdir",
29         "mod_ssi",
30         "mod_accesslog",
33 server.indexfiles = (
34         "index.html",
37 ssi.extension = (
38         ".shtml",
41 accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
43 mimetype.assign = (
44         ".png"  => "image/png",
45         ".jpg"  => "image/jpeg",
46         ".jpeg" => "image/jpeg",
47         ".gif"  => "image/gif",
48         ".html" => "text/html",
49         ".htm"  => "text/html",
50         ".pdf"  => "application/pdf",
51         ".swf"  => "application/x-shockwave-flash",
52         ".spl"  => "application/futuresplash",
53         ".txt"  => "text/plain",
54         ".tar.gz" =>   "application/x-tgz",
55         ".tgz"  => "application/x-tgz",
56         ".gz"   => "application/x-gzip",
57         ".c"    => "text/plain",
58         ".conf" => "text/plain",
61 setenv.add-environment = (
62         "TRAC_ENV" => "tracenv",
63         "SETENV" => "setenv",
65 setenv.set-environment = (
66         "NEWENV" => "newenv",
68 setenv.add-request-header = (
69         "FOO" => "foo",
71 setenv.set-request-header = (
72         "FOO2" => "foo2",
74 setenv.add-response-header = (
75         "BAR" => "foo",
77 setenv.set-response-header = (
78         "BAR2" => "bar2",
81 $HTTP["url"] =~ "\.pdf$" {
82         server.range-requests = "disable"
85 cgi.local-redir = "enable"
86 cgi.assign = (
87         ".pl"  => env.PERL,
88         ".cgi" => env.PERL,
91 userdir.include-user = (
92         "jan",
94 userdir.path = "/"
96 url.access-deny = (
97         "~",
98         ".inc",
101 expire.url = (
102         "/expire/access" => "access 2 hours",
103         "/expire/modification" => "access plus 1 seconds 2 minutes",
106 $HTTP["host"] == "zzz.example.org" {
107         server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
108         server.name = "zzz.example.org"
109         static-file.disable-pathinfo = "enable"
112 $HTTP["host"] == "symlink.example.org" {
113         server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
114         server.name = "symlink.example.org"
115         server.follow-symlink = "enable"
118 $HTTP["host"] == "nosymlink.example.org" {
119         server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
120         server.name = "symlink.example.org"
121         server.follow-symlink = "disable"
124 $HTTP["host"] == "no-simple.example.org" {
125         server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
126         server.name = "zzz.example.org"
129 $HTTP["host"] !~ "(no-simple\.example\.org)" {
130         simple-vhost.document-root  = "pages"
131         simple-vhost.server-root    = env.SRCDIR + "/tmp/lighttpd/servers/"
132         simple-vhost.default-host   = "www.example.org"
135 $HTTP["host"] =~ "bug255\.example\.org$" {
136         $HTTP["remoteip"] == "127.0.0.1" {
137                 url.access-deny = (
138                         "",
139                 )
140         }
143 $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
144         url.access-deny = (
145                 ".jpg",
146         )
149 # deny access for all image stealers
150 $HTTP["host"] == "referer.example.org" {
151         $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
152                 url.access-deny = (
153                         ".png",
154                 )
155         }
158 $HTTP["cookie"] =~ "empty-ref" {
159         $HTTP["referer"] == "" {
160                 url.access-deny = (
161                         "",
162                 )
163         }
166 $HTTP["host"] =~ "allow\.example\.org$" {
167         url.access-allow = ( ".txt" ) # allow takes precedence over deny
168         url.access-deny = ( ".txt" )
171 $HTTP["host"] == "etag.example.org" {
172         static-file.etags = "disable"
173         compress.filetype = ()