lighttpd: Add configuration for chimara-if.org.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sun, 13 Feb 2011 11:27:12 +0000 (12:27 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sun, 13 Feb 2011 11:27:12 +0000 (12:27 +0100)
This has a trac instance and php enabled.

etc/lighttpd/vhosts/chimara-if-org [new file with mode: 0644]

diff --git a/etc/lighttpd/vhosts/chimara-if-org b/etc/lighttpd/vhosts/chimara-if-org
new file mode 100644 (file)
index 0000000..c9ea37c
--- /dev/null
@@ -0,0 +1,30 @@
+$HTTP["host"] =~ ".chimara-if.org$" {
+       var.site-dir         = var.root-dir + "/chimara-if.org"
+       var.site-fcgi-dir    = var.fcgi-dir + "/chimara-if-org"
+
+       evhost.path-pattern  = var.site-dir + "/htdocs/%3/"
+
+       $HTTP["host"] =~ "www.chimara-if.org$" {
+               url.redirect += ("^/trac$" => "/trac/")
+               $HTTP["url"] =~ "^/trac/.*" {
+                       fastcgi.server    += ( 
+                               "/trac" => 
+                               ((
+                                       "socket" => var.site-fcgi-dir + "/trac",
+                                       "check-local" => "disable",
+                               ))
+                       )
+               }
+       }
+
+       # Put the php fastcgi server last, so it won't trigger on any urls that
+       # should be handled by other fastcgi servers (for example, viewing a
+       # .php file in trac results in an url /trac/.../foo.php).
+       fastcgi.server    += ( 
+               ".php" => 
+               ((
+                       "socket" => var.site-fcgi-dir + "/php",
+                       "broken-scriptfilename" => "enable",
+               ))
+       )
+}