1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
debug.log-request-handling = "enable"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
#debug.log-condition-handling = "enable"
## 64 Mbyte ... nice limit
server.max-request-size = 65000
server.systemd-socket-activation = "enable"
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
server.dir-listing = "enable"
server.modules = (
"mod_setenv",
"mod_access",
"mod_expire",
"mod_simple_vhost",
"mod_cgi",
"mod_userdir",
"mod_ssi",
"mod_accesslog",
)
index-file.names = (
"index.html",
)
ssi.extension = (
".shtml",
)
accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = (
".png" => "image/png",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".gif" => "image/gif",
".html" => "text/html",
".htm" => "text/html",
".pdf" => "application/pdf",
".swf" => "application/x-shockwave-flash",
".spl" => "application/futuresplash",
".txt" => "text/plain",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".gz" => "application/x-gzip",
".c" => "text/plain",
".conf" => "text/plain",
)
setenv.add-environment = (
"TRAC_ENV" => "tracenv",
"SETENV" => "setenv",
)
setenv.set-environment = (
"NEWENV" => "newenv",
)
setenv.add-request-header = (
"FOO" => "foo",
)
setenv.set-request-header = (
"FOO2" => "foo2",
)
setenv.add-response-header = (
"BAR" => "foo",
)
setenv.set-response-header = (
"BAR2" => "bar2",
)
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
cgi.local-redir = "enable"
cgi.assign = (
".pl" => env.PERL,
".cgi" => env.PERL,
)
userdir.include-user = (
"jan",
)
userdir.path = "/"
url.access-deny = (
"~",
".inc",
)
expire.url = (
"/expire/access" => "access 2 hours",
"/expire/modification" => "access plus 1 seconds 2 minutes",
)
$HTTP["host"] == "zzz.example.org" {
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
static-file.disable-pathinfo = "enable"
}
$HTTP["host"] == "symlink.example.org" {
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "symlink.example.org"
server.follow-symlink = "enable"
}
$HTTP["host"] == "nosymlink.example.org" {
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "symlink.example.org"
server.follow-symlink = "disable"
}
$HTTP["host"] == "no-simple.example.org" {
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
server.name = "zzz.example.org"
}
$HTTP["host"] !~ "(no-simple\.example\.org)" {
simple-vhost.document-root = "pages"
simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
}
$HTTP["host"] =~ "bug255\.example\.org$" {
$HTTP["remoteip"] == "127.0.0.1" {
url.access-deny = (
"",
)
}
}
$HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
url.access-deny = (
".jpg",
)
}
# deny access for all image stealers
$HTTP["host"] == "referer.example.org" {
$HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
url.access-deny = (
".png",
)
}
}
$HTTP["cookie"] =~ "empty-ref" {
$HTTP["referer"] == "" {
url.access-deny = (
"",
)
}
}
$HTTP["host"] =~ "allow\.example\.org$" {
url.access-allow = ( ".txt" ) # allow takes precedence over deny
url.access-deny = ( ".txt" )
}
$HTTP["host"] == "etag.example.org" {
static-file.etags = "disable"
deflate.filetype = ()
}
$HTTP["host"] == "cgi.example.org" {
index-file.names = ( "nonexistent.txt", "index.pl" )
server.error-handler-404 = "/indexfile/index.pl"
cgi.x-sendfile = "enable"
}
|