leah blogs

September 2005

07sep2005 · Switching to Lighttpd

chneukirchen.org just switched from Apache 2.0.54 to Lighttpd 1.4.3 and all I can say so far is that it’s been a pleasant experience—far less trouble than I imagined.

Moving away from Apache was a bit more complicated to me, as this site was heavily configured using .htaccess—which Lighttpd doesn’t support. However, it turned out to be easy enough to convert this configuration into a monolithic lighttpd.conf.

One thing I tripped over was enabling CGIs. In theory (and as the documentation says), this should be enough:

cgi.assign = ( ".cgi" => "" )

It didn’t work for me, though. Asking in the very helpful and active #lighttpd channel on Freenode helped me find a solution. The extension should be explictly removed from the list of files to publish:

static-file.exclude-extensions = ( ".cgi" )

That was the main problem I had while configuring (Well, except producing a segfault by triggering a rarely-displayed error message that had a wrong format string. But let’s see over that, they fixed it immediately.)

I think I’m going to use Lighttpd for other sites and local development too, it’s just easy to use, small, and very fast. (Static sites ship about 8 times faster than Apache2 when I did a quick ab over it… 1300 requests per second on a loaded machine is really neat.)

As a nice side effect of working on the site, I also replaced the front page of chneukirchen.org with a new design and dynamic content about the various things you can find here.


NP: Aimee Mann—Beautiful

Copyright © 2004–2019