Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

http://sneeu.com/

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

LightTPD subdomain rewrite, Backpack/Basecamp style.

Rewrites test.example.com/example/path/ to example.com/test/example/path/

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" 
}
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed