1debug.log-request-header   = "enable"
2debug.log-response-header  = "enable"
3debug.log-request-handling = "enable"
4
5server.systemd-socket-activation = "enable"
6# optional bind spec override, e.g. for platforms without socket activation
7include env.SRCDIR + "/tmp/bind*.conf"
8
9server.document-root       = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
10server.errorlog            = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
11server.breakagelog         = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log"
12server.name                = "www.example.org"
13
14server.compat-module-load = "disable"
15server.modules = (
16	"mod_auth",
17	"mod_authn_file",
18	"mod_fastcgi",
19	"mod_accesslog",
20)
21
22accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
23
24$HTTP["host"] == "auth.example.org" {
25
26    server.name = "auth.example.org"
27
28    $HTTP["url"] =$ ".php" {
29	auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
30	auth.backend = "htpasswd"
31	auth.require = (
32		"" => (
33			"method"  => "basic",
34			"realm"   => "download archiv",
35			"require" => "valid-user",
36		),
37	)
38    }
39
40    fastcgi.debug = 0
41    fastcgi.server = (
42	"/" => (
43		"grisu-auth" => (
44			"host" => "127.0.0.1",
45			"port" => env.EPHEMERAL_PORT,
46			"bin-path" => env.SRCDIR + "/fcgi-responder",
47			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
48			"check-local" => "disable",
49			"max-procs" => 1,
50			"mode" => "authorizer",
51		),
52		"grisu-resp" => (
53			"host" => "127.0.0.1",
54			"port" => env.EPHEMERAL_PORT,
55			"bin-path" => env.SRCDIR + "/fcgi-responder",
56			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
57			"check-local" => "disable",
58			"max-procs" => 1,
59		),
60	),
61    )
62
63}
64else {
65
66    fastcgi.debug = 0
67    fastcgi.server = (
68	".php" => ( (
69		"host" => "127.0.0.1",
70		"port" => env.EPHEMERAL_PORT,
71		"bin-path" => env.SRCDIR + "/fcgi-responder",
72		"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
73		"check-local" => "disable",
74		"max-procs" => 1,
75	) ),
76	"/prefix.fcgi" => ( (
77		"host" => "127.0.0.1",
78		"port" => env.EPHEMERAL_PORT,
79		"bin-path" => env.SRCDIR + "/fcgi-responder",
80		"max-procs" => 1,
81	) ),
82	".fcgi" => (
83		"grisu" => (
84			"host" => "127.0.0.1",
85			"port" => env.EPHEMERAL_PORT,
86			"bin-path" => env.SRCDIR + "/fcgi-responder",
87			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
88			"check-local" => "disable",
89			"max-procs" => 1,
90		),
91	),
92    )
93
94}
95
96$HTTP["host"] == "wsgi.example.org" {
97	fastcgi.server = (
98		"/" => ( (
99			"host" => "127.0.0.1",
100			"port" => env.EPHEMERAL_PORT,
101			"bin-path" => env.SRCDIR + "/fcgi-responder",
102			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
103			"check-local" => "disable",
104			"fix-root-scriptname" => "enable",
105			"max-procs" => 1,
106		) ),
107	)
108}
109