Book Review: Linux Apache Web Server Administration, 2nd Ed.

 in
With closer attention to the details and the examples, this could have been a great book.

Title: Linux Apache Web Server Administration (Second Edition)Author: Charles AuldsPublisher: SybexISBN: 0-7821-4137-4

I needed to learn how to use Apache, because I needed to maintain a web site at work. I've been using Apache for years, but I never spent the time to read a good description of it. Basically, I ended up maintaining Apache by the seat of my pants. From past experience, I knew it would be useful to understand what a program is able to do, and this book provides a detailed description of the features available to maintain an Apache web server.

This nearly 600-page book contains a wealth of information and covers a wide range of topics: building an installing apache, virtual hosting, server-side includes, scripting (via CGI.pm, FastCGI, PHP and Tomcat/Java servlets), aliasing and redirection, logging, performance tuning and proxying.

I found the writing style to be lucid and relatively easy to follow. The book provides detailed recipes for installing everything, such as a description of how to install RPM files, including their untarring, configuring and making. It also has an extensive index (27 pages), a 9-page table of contents and a number of useful appendices. One appendix that I wish was available on-line details various resources on the Web. And new to the second edition is coverage of Apache 2, which I recently started to use.

One bad point is the author constantly uses the root account to demonstrate things. As an experienced UNIX user (over 20 years), I've adopted the practice of using root only when necessary. Indeed, most of the examples could be cast to use non-root accounts.

Another problem came in the discussion of the mod_env module, demonstrated on p. 203. The author uses

SetEnv PATH

and

UnsetEnv PATH

When I tried it, however, I couldn't get it to work. After doing some homework on the Web and a cursory code inspection, it appears these environment variables cannot be changed. ApacheWeek discusses the fact that comments in the code demonstrate this, but the comments are wrong--it was considered a documentation bug. It would be nice if the author tried code changes prior to describing them. On Usenet, people previously discussed this particular problem, and the answer appears to be you modify the path before running Apache.

I had problems with other examples being incorrect as shown in the book. Some examples seemed to be fundamentally wrong, like the SetEnv example above. All of them indicated the book was not proofread with the intent of confirming the examples. Alternatively, the author might have used a very customized version of standard software. In addition, it would be nice if the Sybex web site contained a tree of files with special httpd.conf examples that you can simply run. Instead, this process is something I'm doing now--I guess making a custom tree sans executables is left as an exercise to the reader. In addition, the files often reference other files, some of which are included and some of which are not. All the files are named with a concatenation of the filename and the example number. In addition, whenever a web site is needed, instead of specifying "localhost", it specifies the author's example web site in the book. It's up to the user to determine "good" errors from "bad" errors, that is, intentionally missing files or misconfiguration of your server.

I knew nothing about MySQL when I started this book. The examples appeared to be good; they discuss CGI forms to look up zip codes. They offer various ways to access the zip code database with CGI.pm, FastCGI, PHP and Tomcat. But when I was ready to try the examples, there was no zip code database in the download from the publisher's web site. The examples are useless without this. A query to the publisher got me the zip code database in a few days. (I searched the Web, but I couldn't find a database similar to the one the author used). This amazed me; what good are database examples without a database?

But the example in the book to insert the zip code table into MySQL is wrong. MySQL is case sensitive for data items (tables and columns), not SQL items. But on page 217, the book mixed the case. When I typed it in exactly as specified, it didn't work. I spent an inordinate amount of time understanding why I couldn't get the examples to work until I looked at some references on the Web.

Another glaring error is on page 64, when the author discusses stripping the httpd binary to save memory in the executable image. He devotes almost a page to the wonders of saving space by stripping binaries (and usefully points out you can't run debugging tools after stripping). But the savings are only in disk space. He thinks the saving are in the runnable image, and if you run multiple copies of httpd, which is normally the case, the savings compound. That's not the way executable images in computers are loaded. I couldn't believe that got past the technical review stage; in fact, I began to wonder if there was a technical review stage. Looking at the preface, where the author generally gives credit to his technical review staff, I noticed a glaring omission--no credits to anyone. The author also doesn't post his e-mail address (the publisher forwards messages), and the errata on the publishers web site contains only one entry.

In conclusion, I did get a lot of useful information from the book. But because of the careless errors in the examples, I can't give it a strong recommendation. I still have some resources and examples to work through, and I liked the cookbook nature--when it is right. I guess the motto "no pain, no gain" is appropriate here: I gained a lot of knowledge, but I experienced much more pain than I wanted. In short, this would be a very good book with a careful proofreading/correction cycle.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Code Examples incorrect

Anonymous's picture

Wanting to learn the best practices in configuring Apache, I bought this book. Right off the bat there were errors in the very first activity I tried from the book. On page 79 under the section 'Using apachectl' the sample command uses the wrong path to the apachectl file used to start apache.

Although this book covers a lot of information which may or may not be useful, it is useless if the code examples as basic as that are incorrect.

Re: Book Review: Linux Apache Web Server Administration, 2nd Ed.

Anonymous's picture

Adam it is a book Review! not a article about apache! that is why you read a lot about the book!

On this article.; Adam Curtis

Anonymous's picture

This article was full of terms and was nicely written as a critic would write. The only thing is I thought I was going to hear more about apache and not a book.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState