Book Review: Lighttpd by Andre Bogus

As an avid user of Lighttpd, I was glad to receive a copy of the “Lighttpd” book by Andre Bogus (Packt Publishing) for review. I’ve been using Lighttpd extensively in production for over a year now, and I’m very satisfied. However, I remember that as a new user I had my share of frustration. In his book, Andre Bogus tries to ease the process for those who decide to move to Lighttpd.

Lighttpd books front cover
Lighttpd book's front cover

The book starts with an introduction and installation guide for Lighttpd. Bogus starts by describing how to install it via a package manager. This is pretty straightforward and should be good for any user of a modern Linux distribution (although I did find it strange that he ignored the automatic dependency handling in every distribution except Gentoo). Bogus doesn’t stop at the obvious; he goes on to describe the procedure for installation from source, for both Lighttpd 1.4 and 1.5. I find it convenient because the package manager installed on the server doesn’t always have the latest stable and development versions of Lighttpd (as a matter of fact, Ubuntu 8.04 LTS has Lighttpd-1.4.19 while the latest stable is 1.4.22). Choosing to describe both 1.4 and 1.5 installation is beneficial for the user. While 1.5 is currently under development, it will one day become stable, and by addressing it, Bogus ensures that his book will remain relevant after that too.

After the installation process, Bogus describes the basic configuration of a Lighttpd server. He includes a nice regular-expressions tutorial, and thus saves the reader time by not having to read and learn the subject elsewhere. Having a regex tutorial together with the URL rewriting and selectors sections is indeed useful and serves as a nice reference for experienced users too.

After the basic configurations are covered, the book moves on to more advanced ones. Covering CGI, the book describes both the 1.4 and 1.5 ways of running CGI scripts and related technologies such as FastCGI and SCGI used in Lighttpd for running PHP, Python, Ruby, and other applications. Once again, the decision to describe both 1.4 and 1.5 is great in my opinion. The book continues to more advanced stuff, like configuring Lighttpd for streaming and SSL encryption, which will be relevant for some users.

The next chapters (7-9) cover securing and optimizing the Lighttpd installation. They describe methods that are important to every Lighttpd user, whether he is a single user or a system admin managing many corporate servers. Focusing on security is important for today’s web applications, which often contain users’ sensitive data and are targeted by malicious activity.

Chapter 10 gives a migration guide from Apache. Many new Lighttpd users switch over from Apache, and this chapter eases the migration. The chapter is useful even for those not familiar with Apache at all, because some popular applications are designed with only Apache in mind, and thus require the user to configure on his own any other web server he might use. By understanding the migration process from Apache to Lighttpd, a potential user will have fewer problems installing applications designed for Apache later on.

In chapter 11, the author overviews the installation of many popular applications such as Ruby on Rails, WordPress, MediaWiki, Trac, AWStat, and AjaxTerm. While the overview guides you through the basic installation, I felt that sometimes it doesn’t go all the way. For example, in the WordPress overview, the user ends up with WordPress installed but without clean URLs, an important feature in my opinion. While clean URLs for WordPress under Lighttpd are well documented on the internet (when I moved my blog to Lighttpd I wrote about configuring WordPress permalinks using mod_rewrite), I think it could have been better to describe that too in the book itself, or at least give a reference to some other guide.

Chapters 12 and 13 cover more advanced topics like server-side scripting with Lua and writing custom Lighttpd modules. While I’m not sure if the average user will find these topics of interest, they will surely be of help to more advanced users looking to extend Lighttpd’s features.

Overall, I’ve found this book to be a nice reference and manual for Lighttpd. It goes through everything from basic setup to the more advanced topics of custom modules. While I think it will be more appropriate for novices, I believe advanced users and system admins may find it beneficial too, even if only as a reference to Lighttpd. Packt Publishing offers the book in two forms: a regular old-fashioned paperback and a DRM-free eBook (in PDF), allowing both printing and copy-pasting. I found the eBook a nice way to read, especially since it provides a simple way to copy and paste the configuration and code examples from the book.

Disclosure: I receive a 12% referral commission for every Lighttpd book sold through the above links.

2 thoughts on “Book Review: Lighttpd by Andre Bogus”

  1. Nice review.
    Weird thing is that when i choice combook (IL) from link above i get 404 error…

  2. Thanks,

    It’s weird indeed, I can confirm the 404 error too. By going directly to the Com.Books shop I was able to locate the book via their search.

Leave a Reply

Your email address will not be published. Required fields are marked *