lighttpd: Enable phpldapadmin on www.stderr.nl/ldap.
[matthijs/servers/drsnuggles.git] / etc / lighttpd / vhosts / stderr-nl
1 $HTTP["host"] =~ ".stderr.nl$" {
2         var.site-dir         = var.root-dir + "/stderr.nl"
3         var.site-fcgi-dir    = var.fcgi-dir + "/stderr-nl"
4
5         evhost.path-pattern  = var.site-dir + "/htdocs/%3/"
6         accesslog.filename   = var.site-dir + "/logs/access.log"
7
8         fastcgi.server    = ( 
9                 ".php" => 
10                 ((
11                         "socket" => var.site-fcgi-dir + "/php",
12                         "broken-scriptfilename" => "enable",
13                 ))
14         )
15
16         $HTTP["host"] =~ "git.stderr.nl$" {
17                 # Put this alias in a url conditional, so urls like /gitweb.css won't get alias'd
18                 $HTTP["url"] =~ "^/gitweb(/.*)?$" {
19                         alias.url += ( "/gitweb" => "/usr/lib/cgi-bin/gitweb.cgi" )
20                 }
21                 $HTTP["url"] =~ ".git/" {
22                         alias.url += ( "/" => "/data/vcs/git/" )
23                 }
24         }
25
26         $HTTP["host"] =~ "indigetes.stderr.nl$" {
27                 auth.backend                   = "htpasswd"
28                 auth.backend.htpasswd.userfile = var.site-dir + "/pandora2008.user"
29
30                 auth.require = ( 
31                         "/" => (
32                                 "method"  => "basic",
33                                 "realm"   => "Di Indigetes",
34                                 "require" => "valid-user"
35                         )
36                 )
37         }
38
39         $HTTP["host"] =~ "^drsnuggles.stderr.nl$" {
40                 alias.url += ("/ldap" => "/usr/share/phpldapadmin/htdocs")
41         }
42
43         $HTTP["host"] =~ "^www.stderr.nl$" {
44                 $HTTP["url"] =~ "^/blosxom" {
45                         cgi.assign += ( "blosxom.cgi" => "/usr/local/bin/aclperl" )
46                         alias.url += ( "/blosxom" => var.site-dir + "/applications/blosxom/blosxom.cgi" )
47                         setenv.add-environment += (
48                                 "BLOSXOM_CONFIG_FILE" => var.site-dir + "/conf/blosxom.conf",
49                                 "BLOSXOM_DATA_BASE" => var.site-dir + "/data/blosxom",
50                                 "BLOSXOM_CODE_BASE" => var.site-dir + "/applications/blosxom",
51                                 "BLOSXOM_HTDOCS_URL" =>  "/blog/",
52                         )
53                 }
54         }
55 }