LightTPD subdomain rewrite, Backpack/Basecamp style.
This example show the values being passed to FCGI for use by Django.
$HTTP["host"] =~ "([^.]+)\.example\.com" { server.document-root = "/users/home/username/domains/example.com/web/public" server.errorlog = "/users/home/username/var/log/lighttpd.example_com.error.log" accesslog.filename = "/users/home/username/var/log/lighttpd.example_com.access.log" fastcgi.server = ( "/main.fcgi" => ( "main" => ( "socket" => "/users/home/username/tmp/django/example_com.socket" ) ) ) url.rewrite-once = ( "^(/.*)$" => "/main.fcgi/%1/$1" ) server.error-handler-404 = "/main.fcgi" }