lighttpd.net runs on 1.5.0 10

Posted by jan Wed, 09 May 2007 10:24:00 GMT

All the lighttpd.net 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 (irc.freenode.net). The server is running in valgrind and should provide enough information to fix the problem.

compression

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" )
}

trac

For the trac I use:

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

    $HTTP["url"] =~ "^/trac/" {
        proxy-core.backends = ( "127.0.0.1:9090" )
        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 blog.lighttpd.net and www.lighttpd.net 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.

Trackbacks

Use the following link to trackback from your own site:
http://blog.lighttpd.net/articles/trackback/4250

  1. lighttpd.net is running 1.5.0 trunk From Kevin Worthington
    According to weigon, All the lighttpd.net domains (blog, trac, www, xcache, upload, …) are now running lighttpd 1.5.0-trunk. Congratulations lighttpd team! Keep up the good work. ...
Comments

Leave a response

  1. Bert JW Regeer Wed, 09 May 2007 15:46:41 GMT
    Safari is able to handle compressed CSS/JavaScript as well, I have compression enabled on my site and Safari handles it without a problem!
  2. Dan Wed, 09 May 2007 15:59:46 GMT
    Great to hear! You should look into setting up monit to monitor LightTPD for crashes. It'll email you when there's a problem, and automatically attempt to restart lightty. Its much more reliable than relying on others to ping you on IRC when a site goes down ;)
  3. darix Wed, 09 May 2007 16:05:55 GMT
    i run 1.5 on http://pixel.global-banlist.de./ aswell. but i prefer runit (http://smarden.sunsite.dk/runit) for the house keeping. an article about my rails + lighttpd setup will follow.
  4. Johan Bergström Wed, 09 May 2007 16:15:06 GMT
    Just a thought; Since most browsers happily accept gzipped js/css, one could set us up with somethink like:
    deflate.mimetypes = ( "text/html","text/javascript", "text/css" )
    
    $HTTP["useragent"] =~ "MSIE" {
      deflate.mimetypes = ( "text/html" )
    }
    
  5. Jan Kneschke Thu, 10 May 2007 06:29:17 GMT
    keeping the process alive is one problem, browser compat problems the other one. Looks like we only have problems left with trac + fastcgi + keepalive. The current code looks good enough for another pre-release.
  6. nmcsween Thu, 10 May 2007 08:18:16 GMT
    @Johan Bergström One thing wrong with that though alot of browsers masquerade as MSIE so it might not get to that whole 1% ;).
  7. Mazdak Rezvani Sat, 12 May 2007 14:57:40 GMT
    Great work. Thanks. A question about cleanurl.lua. This script works with FastCGI. I'd like to do a similar thing with http proxy. I am running mongrel and using mod_proxy_core's http proxying to balance them. I'd like lighty to serve the files if they exist, otherwise continue on forwarding the request to mongrel. What's the best way to accomplish this?
  8. Jan Kneschke Sat, 12 May 2007 15:48:44 GMT
    the script works for all backends. See lighttpd-1.5.0 for better mongrel support.
  9. Mazdak Rezvani Sat, 12 May 2007 20:32:32 GMT
    Hi Jan, I am using 1.5-trunk. My big problem is that I want lighty to serve the static content while mongrel handles all the rails stuff. Any help would be appreciated.
  10. Mazdak Rezvani Sun, 13 May 2007 15:24:14 GMT
    Just looked at the requests and looks like that's exactly what's happening: Lighttpd is serving the files that are on disk, and everything else proxies over! Interesting!
Comments