Apache DevCenter

oreilly.comSafari Books Online.Conferences.

We've expanded our LAMP news coverage and improved our search! Search for all things LAMP across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Apache Subscribe to Newsletters
Apache: The Definitive Guide, 3rd Edition

Newbies Find Help in O'Reilly's Latest Apache Book

by Peter Laurie, coauthor of Apache: The Definitive Guide, 3rd Edition
01/02/2003

Every couple of years the job comes round of revising Apache: The Definitive Guide to produce a new edition; this past year it was time for number three. Ben, my coauthor, and I live quite a way apart and updating the book gives us the chance to work together for a few months. I should say that Ben is my son: he lives in London, where he is a director of the Apache Software Foundation and is responsible for the Secure Sockets Layer. He is also busy making a reputation for himself as an international security guru. I live quite a distance away on the Channel coast and we don't see each other that often. Of course, we don't actually see each other when we're doing an Apache revision either, which we do mostly by email and telephone, but it's fun nevertheless and we're often quite polite to each other.

My role is to set up the demonstration Web sites, which form the frame of the book and, as an ex-journalist, to write most of the words. Ben's role is to make sure that what we do and describe is useful, relevant, and technically correct. He also contributes two chapters for programmers on writing extra Apache modules.

When we think we have finished, have done a good job, and deserve congratulations all around, O'Reilly's editors fix us a cold bath by sending the draft out to a pack of ravenous technical reviewers. The reviewers devote considerable effort to improving the manuscript by pouring industrial-strength scorn on many of our most interesting statements. In the process they improve our characters, which we wrongly thought had been put in good shape last time. So, with every edition we get morally finer and after a few more we will rank with the angels for rectitude and righteousness.

This year the process was unusually abrasive and, I hope, edifying. We wondered whether 9/11 and Enron had put our reviewers in a particularly edgy mood or whether the cause was in ourselves. We had finished the previous edition in the autumn of 1998. Since then I had put my knowledge of Apache into use by setting up and running a couple of real Web sites: www.Medic-Planet.com, a handy medical encyclopaedia, now taken down because we couldn't get it to pay a penny; and www.BridportPrize.org.uk, an electronic version of one of the U.K.'s most successful literary prizes.

Related Reading

Apache: The Definitive Guide
By Ben Laurie, Peter Laurie

By doing this, I found that what we had told people in our book was not by any means all you needed to know. Both of these sites relied on large, complicated relational databases and had to be able to take money securely from their customers. If an amateur webmaster, like me, was to do these things with Apache, he or she had to be able to persuade a scripting language and a database manager to work together with the server. In the first two editions we had left this as "an exercise for the student" -- now I faced the reality of making it happen myself.

Like so many things in life, this "exercise" is not that difficult once you know how to do it. But getting to that point is not easy because until you have it all working, nothing much happens. There are thousands of ways to set up such a site wrong and not very many ways to set it up right, so the beginner spends a lot of time looking at a blank screen. With Ben's patient help, of course, it didn't stay difficult for long, but I felt that many of our readers would not have such a son at their elbow and could do with a bit of practical advice and example.

A journalist's most important stock in trade is his ignorance. So I decided to take advantage of my evaporating ignorance in order to write the material that I would have liked to have read before I built my own web sites.

As someone once said,

Because I was thirsty
I dug a well, that others might drink.

This is where our aims, those of our reviewers' and, perhaps, though we hope not, our readers' diverged. To many of our reviewers the new material seemed, frankly, silly. This was kindergarten stuff, unworthy of a book from the prestigious house of O'Reilly on a subject as grand as Apache and with a claim to being "definitive guide." They themselves were experts. It had taken them a lot of time and effort to learn what they know and from their vantage point high up on the tech-mountain, we were describing scrambles among foothills so far off and low down they were hardly visible.

But on the ground beginners face--as with many technologies--a steep cliff right before them. Nothing makes sense because they don't understand the basic ideas. Conceptually, beginners have to lift themselves up the cliff by pulling at their own bootstraps. A journalist must learn to say, "I don't know what you are talking about." People then explain, you write it down, and earn a living. Many people in technology hate to say that and they feel uneasy about anyone who does. But are we writing for them?

Certainly we don't want them to say that we have anything wrong. But on the other hand we aren't telling them much they don't already know. Surely, the point of a book like this is that it should tell its readers what they do not know. If it does not, there is little point in either writing or reading it. We have to judge what to include by what we think a substantial number of our readers might not know and might hope to find out.

Part of our mission then is to explain all the core capabilities of Apache and how to use them; the other part is to offer as painless an introduction as we can to the business of getting Apache up and running in a useful web site.

Netcraft reports that there are now more than ten million active sites running Apache. The normal turnover of life must mean that several hundred thousand Apache Web sites change webmasters every year, and the newcomers can't all be experts, so we figure that there must be one or two webmasters out there who could use some basic guidance in getting started.

So, in the third edition of Apache: The Definitive Guide, we have branched out from our previous format to include a good deal of new material in several different categories. We provide simple introductions to using Apache with the main scripting languages and databases.

The languages we cover include PHP, Perl, Python, and Java via Tomcat, with sample scripts to show how to use the languages to extract data from a database, to generate HTML forms on the fly, to extract new data from the returned messages and save it again in the database. (This cycle encapsulates the basic rhythm of e-commerce. Once you have chosen a language and mastered these techniques the rest is just elaboration.)

Since we limit ourselves to open source software, we cover only three possible databases: MySQL, PostgreSQL, and MSQL (which is sort of open source). They are all based on the standard SQL database model and there is not a lot to choose between them. The links between them and the scripting languages are relatively simple.

Since Perl is so popular we describe how to modify its link with Apache to make it run well in a busy site. We look briefly at XML and discuss Cocoon, which teams up with Apache to create XML on the fly. Finally, we check over the operational and security problems of using Apache in big commercial sites.

We also cover the changes from Apache v1.3 to v2. In fact, these will have little impact on the ordinary webmaster: they affect the internal architecture of the package and lay down a better foundation for future developments. But they do mean that the module interface is completely different and Ben has completely rewritten his two chapters on this topic.

So we have done our bit; we have put in a good deal of work and a good portion of the book is new material. We hope it will be even more useful than it has been in the past.


O'Reilly & Associates recently released (December 2002) Apache: The Definitive Guide, 3rd Edition.

  • Sample Chapter 11, Security, is available free online.

  • You can also look at the Table of Contents, the Index, and the Full Description of the book.

  • For more information, or to order the book, click here.

Peter Laurie is the coauthor of Apache: The Definitive Guide, 3nd Edition


Return to Apache DevCenter.


What part or parts of Apache: The Definitive Guide have you found most useful in your work?
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Main Topics Oldest First

Showing messages 1 through 3 of 3.

  • Debian configuration
    2005-06-21 11:33:39  displaced [Reply | View]

    Your book is quite informative and I'm impressed with the amount of information given. Unfortunately, I use Debian primarily for it's stability and this is the version that I'm most familiar with.
    This is where the problem comes in, In your book you suggest deleting/copying the basic apache config file httpd.conf and rewriting it from scratch. this would allow you to add only the things that you would like to use in your web server configuration. The way that Apache is setup on Debian makes this idea a dangerous proposition being as httpd is actually a blank file and they have created an apache2.conf file that takes it's place. This file uses includes to create the site info and they have also created several tools to make apache2 "easier" to work with. Unfortunately being as I'm new at this and can't find any information on these tools except a reference in the README to them. This makes it difficult at best to do this. Is there anyway that you could look at this setup and do a supplimental to the book describing what these tools are and what they do?
  • Missing C code samples?
    2004-06-05 11:55:48  david_christie [Reply | View]

    I don't see any of the C code samples in the example download files for _Apache: The Definitive Guide_, 3rd Ed.:

    http://examples.oreilly.com/apache3/apache3.tgz
    http://examples.oreilly.com/apache3/apache3.zip

    Unzipped with WinZip, these yield up only one .c file for me, "echo.c"

    Am I doing something wrong, or were these files omitted / withdrawn for some reason?

    I was looking for "mod_reveal.c" (from p. 477).

    Thanks
  • When the Indian Edition will be available
    2003-02-18 01:48:14  anonymous2 [Reply | View]

    Hi,

    We are eagerly waiting for the Indian Edition of this book. Pls publish the date/month of arrival in the Web Site ..

    Thanks
    -Kumar


Tagged Articles

Be the first to post this article to del.icio.us

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com