Lighttpd

1147084854000 » Tagged as: web 0.8

I came across lighttpd only because I decided to try out Ruby on Rails. So far I have not had anything good to say about Ruby. And because one shouldn't say anything unless one has something nice to say, I will refrain from further comments on Ruby. On Lighttpd I do have lot's of nice things to say. It's highly impressive.

Lighttpd really is light. The RPM is just 413 KB. While Apache tries to be everything to everyone lighttpd tries to keep things simple relying on fastcgi to provide the dynamics.

According the authors lighttpd is fast, and they have stats to prove it too. However if you look very closely you see that it's just nit picking. According to their benchmark stats, apache takes 1 millisecond longer for each request. If you deliver about a million hits you will then be able to save a bit of resources. All benchmarks should be treated with a large dose of salt.

Stats aside, what's interesting is the configuration file. It's intuitive, you can understand most of it with out having to read the manual and the manual itself is well organized.

How do you install PHP on it? Well it's simple enough, just a matter of replacing the --with-apxs2 configuration directive with three directives related to fastCGI. However restarting the webserver immidiately results in an error.

2006-04-25 22:41:46: (mod_fastcgi.c.1023) the fastcgi-backend /usr/local/bin/php failed to start:
2006-04-25 22:41:46: (mod_fastcgi.c.1027) child exited with status 0 /usr/local/bin/php

On close inspection you find that the PHP fastCGI installation guide says not to use the '--enable-discard-path' directive. When I looked closer still, I found that I had the --disable-cgi directive which I had forgotten to delete. After having done that, compliation went smoothly and the server started up with out any further trouble. It's nice.

comments powered by Disqus