Annotation of embedaddon/lighttpd/tests/lighttpd.conf, revision 1.1.1.1
1.1 misho 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/"
6:
7: ## 64 Mbyte ... nice limit
8: server.max-request-size = 65000
9:
10: ## bind to port (default: 80)
11: server.port = 2048
12:
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"
19:
20: server.dir-listing = "enable"
21:
22: #server.event-handler = "linux-sysepoll"
23: #server.event-handler = "linux-rtsig"
24:
25: #server.modules.path = ""
26: server.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:
46: server.indexfiles = ( "index.php", "index.html",
47: "index.htm", "default.htm" )
48:
49:
50: ######################## MODULE CONFIG ############################
51:
52: ssi.extension = ( ".shtml" )
53:
54: accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
55:
56: mimetype.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: }
75: compress.filetype = ("text/plain", "text/html")
76:
77: setenv.add-environment = ( "TRAC_ENV" => "tracenv", "SETENV" => "setenv")
78: setenv.add-request-header = ( "FOO" => "foo")
79: setenv.add-response-header = ( "BAR" => "foo")
80:
81: $HTTP["url"] =~ "\.pdf$" {
82: server.range-requests = "disable"
83: }
84:
85: fastcgi.debug = 0
86: fastcgi.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:
91: cgi.assign = ( ".pl" => "/usr/bin/perl",
92: ".cgi" => "/usr/bin/perl",
93: ".py" => "/usr/bin/python" )
94:
95: userdir.include-user = ( "jan" )
96: userdir.path = "/"
97:
98: ssl.engine = "disable"
99: # ssl.pemfile = "server.pem"
100:
101: $HTTP["host"] == "auth-htpasswd.example.org" {
102: auth.backend = "htpasswd"
103: }
104:
105: auth.backend = "plain"
106: auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
107:
108: auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
109:
110:
111: auth.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:
125: url.access-deny = ( "~", ".inc")
126:
127: url.rewrite = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
128: "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1" )
129:
130: url.rewrite-if-not-file = ( "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2" )
131:
132: expire.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
138: status.status-url = "/server-status"
139: status.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: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>