Getting More Out Of Apache (Part 1) (
Page 1 of 5 )
While the default Apache configuration is good enough for most
Web applications, there's a lot more under the hood of the planet's most
popular Web server. In this article, find out how to create virtual hosts
on a single Web server, and use Server-Side Includes for greater
flexibility in your HTML pages.Of the diverse open-source applications currently available, perhaps the most
impressive success stories are those of the Linux kernel and the Apache Web
server. The story behind the Linux kernel is a well-known one - the tireless
efforts of Linus Torvalds and his team of developers to create an open, stable
and scalable operating system - but perhaps less well-known is the story of how
the Apache project began, and how it has grown to the point where 60% of the Web
runs on Apache.
The Apache project began in 1995, as a collaborative
effort between a group of webmasters who wanted to build a "robust and
commercial-grade implementation of the HTTP protocol" (
Apache.org), and make this available to the user
community absolutely free of charge. Originally conceived as a series of patches
to the original NCSA httpd daemon, the project ultimately took on a life of its
own, with the NCSA daemon undergoing several redesigns in order to make it more
extensible and modular.
The end result (perhaps that's not the right
phrase, since the Apache server is continuously evolving) is a Web server that's
powerful enough to meet the needs of both large and small Web sites, yet simple
enough to configure that you can get it up and running on your UNIX (or Windows)
system in less than five minutes.
The popularity of Apache among Web site
administrators and developers can be judged from recent Netcraft findings, which
reveal that 15,414,726 Web sites, or a little over 60% of the total Web sites on
the Internet, run on Apache (
http://www.netcraft.com/survey/).
Pretty impressive for a program that began life as a series of patches
(incidentally, the term "Apache Server" is derived from the words "A PAtCHy
Server" - a bow to Apache's genesis as a series of patches applied to an
existing httpd daemon)
Now, while the out-of-the-box Apache configuration
is usually more than satisfactory for those without special requirements, Apache
does allow you to customize its behaviour extensively. Most of this
customization takes place via the Apache configuration file, "httpd.conf", and
is implemented via directives in this file.
Across this article and the
next, I'll be discussing some of the more interesting things you can do with
Apache, both to help you maximize your usage of the Web server and to increase
your familiarity with some of the features hidden under the hood of this
wonderful piece of software.