Apache, The Definitive Guide
Authors: Ben Laurie and Peter Laurie
Publisher: O'Reilly & Associates
Price: $34.95 US
Reviewer: Luca Cotta Ramusino
My first installation of Apache dates back to version 1.0.0. I wish I could say it was an exercise in TCP/IP wizardry, but thanks to the program's careful engineering, it was really nothing of notice. At work, I noticed a little-used Sun SPARCstation 4 not connected to the outside world. Since I had wanted to experiment with http and the Web for a long time, I downloaded a Solaris binary of Apache from the canonical ftp site, uncommented a couple of lines in the configuration files, started the http daemon and went to look for coffee. I added a script for starting and stopping Apache on system boot and shutdown and haven't touched it since. As far as I know, “Little Sparky” is still happily serving HTML to all interested parties.
After over a year of faithful service, I felt it was time to add some whizbang to Little Sparky. Being a big fan both of “In a Nutshell” books and the Apache http server, I jumped at the chance to read and review Apache, The Definitive Guide. I was not disappointed. The book actually lives up to its bold claim, as it contains everything you will ever want to know about the world's most popular web server, although sometimes the information provided is quite terse.
Weighing in at a little over 250 pages, the book can be roughly divided into three sections, each more advanced than the previous. The authors warn that unless stated otherwise, all information is applicable to Apache version 1.1.1, and they admit that Apache is a moving target. Keeping the book current with the latest code development has not been an easy task.
The first part of Apache, The Definitive Guide covers, among other things, basic server operations, CGI scripting and user authentication.
The second part addresses more specialized needs such as language arbitration (i.e., delivering specialized content in response to the browser's preferred language setting), server-side includes and the use of Apache as a proxy server.
Finally, the third part caters to the more adventurous palates. Intrepid webmasters wishing to extend and modify Apache's standard behavior are treated to three chapters on the Apache API and on writing custom Apache modules. Not surprisingly, one of the authors is a member of the core Apache programming team. Alternatively, if you like to search the web for ready-made features not included in the base distribution, you can read about the most popular contributed modules, such as FastCGI, a server module designed to improve the execution of CGI scripts.
The book travels at a fast pace throughout—sometimes a little too fast, given the richness and complexity of the information available on Apache. Take virtual hosting, for example. Virtual hosts are a popular means for Internet service providers to offer rented web space to different domains using the same machine.
Virtual hosts are introduced as early as Chapter 3, and the topic is immediately exhausted by handling httpd and Unix configuration in a scant three pages. Another case in point is cookies, a clever device invented by Netscape to counter the Web's inherent statelessness. Cookies are given only cursory coverage while describing the server configuration directive CookieTracking. Personally, I would have wished for a more extensive discussion.
The authors give plenty of examples whenever they introduce a new concept or topic. All of the code, HTML documents and configuration files are neatly organized on the companion CD-ROM, so that you can exactly reproduce the sample sites simply by copying the appropriate directory tree to your hard disk.
A word of warning—while the authors briefly summarize the workings of Unix and TCP/IP, you really need to be competent in both before you pick up this book. Also, it helps if you have a correctly configured system before you start playing with the examples provided.
If you have a slow link to the Internet, you will appreciate the added convenience of two Apache distributions on the accompanying CD-ROM. You get both a stable 1.1.1 and a more advanced, but potentially misbehaving, 1.2b4. The distributions are all source code, as the book is not geared specifically to Linux. However, compilation and installation is straightforward and complete directions are given at the beginning of the book.
I liked Apache, The Definitive Guide for a number of reasons. In short, the book has everything you need to get started with the Apache web server, and to help you progress from there to more complex operations. I believe it complements nicely the skimpy “official” documentation available on Apache's web site. Thanks to its broad coverage of topics, the book should appeal to both beginners and experienced webmasters.
Luca Cotta Ramusino works at Foster Wheeler Italiana, where he tries to pass as a “suit” in order to promote the use of Linux. He can be contacted via e-mail at email@example.com.