summaryrefslogtreecommitdiff
path: root/tests/fastcgi-responder.conf
blob: 8f509369dad774ec16b84dc7ae2faf3b92a13a3e (plain)
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
debug.log-request-header   = "enable"
debug.log-response-header  = "enable"
debug.log-request-handling = "enable"

server.systemd-socket-activation = "enable"
# optional bind spec override, e.g. for platforms without socket activation
include env.SRCDIR + "/tmp/bind*.conf"

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.compat-module-load = "disable"
server.modules += (
	"mod_auth",
	"mod_authn_file",
	"mod_fastcgi",
	"mod_accesslog",
)

accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"

$HTTP["host"] == "auth.example.org" {

    server.name = "auth.example.org"

    $HTTP["url"] =$ ".php" {
	auth.backend.htpasswd.userfile = env.SRCDIR + "/lighttpd.htpasswd"
	auth.backend = "htpasswd"
	auth.require = (
		"" => (
			"method"  => "basic",
			"realm"   => "download archiv",
			"require" => "valid-user",
		),
	)
    }

    fastcgi.debug = 0
    fastcgi.server = (
	"/" => (
		"grisu-auth" => (
			"host" => "127.0.0.1",
			"port" => env.EPHEMERAL_PORT,
			"bin-path" => env.SRCDIR + "/fcgi-responder",
			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
			"check-local" => "disable",
			"max-procs" => 1,
			"mode" => "authorizer",
		),
		"grisu-resp" => (
			"host" => "127.0.0.1",
			"port" => env.EPHEMERAL_PORT,
			"bin-path" => env.SRCDIR + "/fcgi-responder",
			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
			"check-local" => "disable",
			"max-procs" => 1,
		),
	),
    )

}
else {

    fastcgi.debug = 0
    fastcgi.server = (
	".php" => ( (
		"host" => "127.0.0.1",
		"port" => env.EPHEMERAL_PORT,
		"bin-path" => env.SRCDIR + "/fcgi-responder",
		"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
		"check-local" => "disable",
		"max-procs" => 1,
	) ),
	"/prefix.fcgi" => ( (
		"host" => "127.0.0.1",
		"port" => env.EPHEMERAL_PORT,
		"bin-path" => env.SRCDIR + "/fcgi-responder",
		"max-procs" => 1,
	) ),
	".fcgi" => (
		"grisu" => (
			"host" => "127.0.0.1",
			"port" => env.EPHEMERAL_PORT,
			"bin-path" => env.SRCDIR + "/fcgi-responder",
			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
			"check-local" => "disable",
			"max-procs" => 1,
		),
	),
    )

}

$HTTP["host"] == "wsgi.example.org" {
	fastcgi.server = (
		"/" => ( (
			"host" => "127.0.0.1",
			"port" => env.EPHEMERAL_PORT,
			"bin-path" => env.SRCDIR + "/fcgi-responder",
			"bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
			"check-local" => "disable",
			"fix-root-scriptname" => "enable",
			"max-procs" => 1,
		) ),
	)
}