# This is a section showing an example lighttpd configuration.  There's
# a problem with the "^/pkgdb/(.*)$" => "/pkgdb_web.py/$1" -- the $1
# parameter seems to match too much.
#
# http://stackoverflow.com/questions/4533109/lighttpd-mod-rewrite-and-web-py-unexpected-behavior

server.document-root = ".../gar/v2/lib/web/static"

url.rewrite-once = (
  "^/favicon.ico$" => "/favicon.ico",
  "^/pkgdb-static/(.*)$" => "/$1",
  "^/pkgdb/(.*)$" => "/pkgdb_web.py/$1",
  "^/releases/(.*)$" => "/releases_web.py/$1"
)

## PythonPath "sys.path + ['.../gar/v2/lib/web', '.../gar/v2']"
fastcgi.server = (
"/pkgdb_web.py" =>
((
   "socket" => "/tmp/fastcgi-pkgdb.socket",
   "bin-path" => ".../gar/v2/lib/web/pkgdb_web.py",
   "max-procs" => 1,
   "bin-environment" => (
     "REAL_SCRIPT_NAME" => ""
   ),
   "check-local" => "disable"
)),
"/releases_web.py" =>
((
   "socket" => "/tmp/fastcgi-releases.socket",
   "bin-path" => ".../gar/v2/lib/web/releases_web.py",
   "max-procs" => 1,
   "bin-environment" => (
     "REAL_SCRIPT_NAME" => ""
   ),
   "check-local" => "disable"
)),
)

