xref: /lighttpd1.4/tests/condition.conf (revision 34709192)
1
2debug.log-request-handling = "enable"
3debug.log-condition-handling = "enable"
4
5server.document-root         = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
6
7## bind to port (default: 80)
8server.port                 = 2048
9
10## bind to localhost (default: all interfaces)
11server.bind                = "localhost"
12server.errorlog            = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
13server.breakagelog         = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log"
14server.name                = "www.example.org"
15server.tag                 = "Apache 1.3.29"
16
17
18server.modules = (
19	"mod_redirect",
20	"mod_accesslog",
21)
22
23accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
24
25mimetype.assign = (
26	".html" => "text/html",
27)
28
29url.redirect = (
30	"^" => "/default",
31)
32
33$HTTP["host"] == "www.example.org" {
34	server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
35	server.name = "www.example.org"
36	url.redirect = (
37		"^" => "/match_1",
38	)
39}
40else $HTTP["host"] == "test1.example.org" {
41	server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
42	server.name = "test1.example.org"
43	url.redirect = (
44		"^" => "/match_2",
45	)
46}
47# comments
48else $HTTP["host"] == "test2.example.org" {
49	server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
50	server.name = "test2.example.org"
51	url.redirect = (
52		"^" => "/match_3",
53	)
54}
55
56	 # comments
57
58else $HTTP["host"] == "test3.example.org" {
59	server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
60	server.name = "test3.example.org"
61	url.redirect = (
62		"^" => "/match_4",
63	)
64
65	# comments
66	$HTTP["url"] == "/index.html" {
67		url.redirect = (
68			"^" => "/match_5",
69		)
70	}
71}
72
73else $HTTP["host"] == "test4.example.org" {
74	server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
75	server.name = "test4.example.org"
76	url.redirect = (
77		"^" => "/match_6",
78	)
79
80	$HTTP["url"] =~ "^/subdir/" {
81		url.redirect = (
82			"^" => "/match_7",
83		)
84	}
85}
86
87$HTTP["url"] != "/show/other/server-tag" {
88}
89else $HTTP["scheme"] == "http" {
90	server.tag = "special tag"
91}
92