lighty's life

lighty developer blog Runs on 1.5.0

All the domains (blog, trac, www, xcache, upload, …) are now running lighttpd 1.5.0-trunk. It took some debugging to sort out problems with the way trac wants to handle PATH_INFO 1841
and how ruby handles fastcgi-keepalive requests via Unix-Sockets 1850 1849

In case you see that one of the sites is down, ping me (weigon) on IRC ( The server is running in valgrind and should provide enough information to fix the problem.


All the content is sent as compressed content if the client supports it. As some browsers have problems with compressed javascript and CSS we only enabled it for Firefox for now.

deflate.mimetypes = ( "text/html" )

$HTTP["useragent"] =~ "Firefox" {
  deflate.mimetypes += ( "text/javascript", "text/css" )


For the trac I use:

$HTTP["host"] =~ "^trac\.lighttpd\.net" {
    # alias, ...

    $HTTP["url"] =~ "^/trac/" {
        proxy-core.backends = ( "" )
        proxy-core.protocol = "fastcgi"
        proxy-core.rewrite-request = (
           "_pathinfo" => ( "^/trac(/.*)" => "$1" ),
           "_scriptname" => ( "^(/trac/)" => "$1" )

the rewrites tune the PATH_INFO and SCRIPT_NAME settings to the needs of trac. It should also handle the old bug around trac without a prefix.

rails + fastcgi

Thanks to the rails apps we run on and I could trace down some nasty bugs. One is still open and is around the fastcgi keepalive + fcgi.rb. It isn’t tracked down yet, not enabling it seems to be safe for now.

For mephisto we are using the cleanurl.lua to get rid of the server.error-handler-404.