I’ve just finished reading Lighttpd by Andre Bogus and published by Packt Publishing, and this is a great book for anyone interested in lighttpd. This is a good read and it will explain all the features of lighttpd and how you can use it from just serving static files to a complete apache replacement. And all these in a pretty compact book, at 223 pages.
The topics are as follows:
- Introduction to Lighttpd
- Configuring and Running Lighttpd
- More Virtual Hosting and CGI
- Downloads and Streams
- Big Brother Lighttpd
- Encryption: SSL
- Securing Lighttpd
- Containing Lighttpd
- Optimizing Lighttpd
- Migration from Apache
- CGI Revisited
- Using Lua with Lighttpd
- Writing Lighttpd Modules
Even if lighttpd version 1.5.0 is the development version and not yet released as stable, this brings a set of incompatible changes with the existing stable branch 1.4.x (with the latest version at this time 1.4.22 released just yesterday), Andre presents all over the book the changes 1.5 will bring, compared with the existing version. This is great as you will not have to buy a new book when 1.5 will be released (still a long time from now, if you ask me ;-) ).
The author recommends installing the software using the sources in order to get the latest available version. I am not saying this is not a good approach, but I think we should give more credit to the modern Linux distros, that are starting to recognize lighty’s importance and include it accordingly in their repositories. For example, the latest debian stable release, _lenny _shipped with lighttpd 1.4.19 that is quite recent considering the time debian freeze their repos. Anyway this is nothing fancy and anyone can install lighty in debian just by using:
aptitude install lighttpd
easing the installation process or deployment on several machines.
After going into the details on how to configure and start lighttpd, the author goes into some parts that are not so well known and documented about lighttpd: virtual hosting, cgi, and ssl. He gives step-by-step examples on how to achieve each configuration target, and this can be very useful when migrating from apache to lighttpd. This is expanded in more detail in a later chapter “Migration from Apache” with .htaccess and PHP, rewriting rules and WebDAV. What I particularly liked the way he explained howto setup some real open source applications on lighttpd: WordPress, phpMyAdmin, trac, awstats, etc. This makes it a very practical guide and very easy to follow and understand.
The part about securing and optimizing lighttpd is also very informative, even though I would have liked to see better solutions for the performance tuning, as lighty even if working good out of the box, can be tuned very nicely if needed. Finally, the book is closing with some more advanced chapters on using lua scripts or writing lighttpd modules.
This book is about lighttpd, and tries to cover everything you would want to know about lighttpd. Overall it is a good book and it can serve to anyone starting with lighttpd and using it for more than serving static files (even though that is a good start also).