How To Build the Apache of Your Dreams (
Page 1 of 8 )
The best part about Apache is that you can custom build it to include exactly what you need. The default
configuration is a good one, but its far-too-general nature is, by definition, not the best choice for
the majority of installations. With a host of plug-in modules available for free over the Internet,
customizing Apache to its fullest extent is not only fast and easy, but well worth the time spent.Apache began as a series of patches the National Center for Supercomputing
Application's httpd. After httpd's lead developer left NCSA and active
development of httpd began to stagnate, programmers from around the world found
they needed a central repository to maintain the body of code and patches that
had accumulated. A group of these webmasters banded together, and, with machines
and bandwidth donated by HotWired, set up an informal coalition to direct the
the development of this new server. Dubbed Apache ("a patchy server"), it
quickly became the most popular server on the Net after it's birth in April
1995, at version 0.6.5.
Today, with over 60% of the webserver market
share according to
Netcraft,
Apache is a shining example of how a well-planned and well-implemented piece of
(free) software can be, far and away, the best application of its type -- even
better than high-priced commercial alternatives.
{mospagebreak title=The
Modular Design of Apache} Apache was designed from scratch to be modular; that
is, the original programmers assumed that it would be extended by other
developers, who would write small pieces of code which could be integrated into
Apache with ease. They did this by creating a modular API and a well-defined
series of phases that every request went through, so that customizing a
particular aspect of Apache is often as simple as stringing together API methods
that would be run during a particular phase of the request. These phases
included everything from server initialization itself (when Apache reads its
configuration files), to translating a requested URL into a filename on the
server, to logging the results of the transaction, and everything in
between.
Developers were quick to respond, and to date there are hundreds
of Apache modules available. Many of them are registered with the Apache
project, and can be found at
modules.apache.org. Chances are pretty
good that if there is something you need, someone else has also needed it in the
past, and written it. The important question, of course, is how to take
advantage of these great resources.
Apache's modularity can potentially
make configuration complicated. By default, Apache ships with a number of useful
modules, and the most generally useful of these are enabled by default.
Compiling Apache as it is distributed will give you a highly functional, and
very flexible, web server capable of handling most of the needs of a general
purpose web site.
I know of very few general purpose web sites, however,
and they are mostly ISPs. While it is a good starting point, the generic Apache
configuration is probably not optimal for you. A little knowledge of the
standard modules and what they do can make for a faster, more secure web server,
simpler configuration files, and a host of new and exciting
features.