This article introduces those new to networking to Apache, the Hypertext Transfer Protocol (HTTP), and the basics of system administration. It is excerpted from chapter one of Peter Wainwright's book Pro Apache (Apress, 2004; ISBN: 1590593006).
THIS CHAPTER IS an introduction to both Apache and the concepts that underlie it; that is, the Hypertext Transfer Protocol (HTTP) and the basics of networking and the Internet. Itís aimed at those totally new to Apache and Web servers in general. This chapter is introductory in nature, so if youíre familiar with system administration or are well read on Internet subjects, you might want to skip ahead to Chapter 2.
In this chapter, Iíll also discuss the most important criteria to consider when choosing server hardware. Although itís quite easy to install Apache manually, youíll also look at dedicated server solutions for those looking for ready-made solutions with vendor support. Finally, Iíll round off the chapter by presenting some of the graphical configuration tools available for Apache installations.
Apache: The Anatomy of a Web Server
In this section, Iíll introduce some of the basic concepts behind Web servers. Youíll also look at how Apache works and why it has become the Web server of choice on the Internet.
The Apache Source
Apache is the most popular Web server software on the Internet. The true secret of Apacheís success is that the source code is freely available. This means that anyone who wants to add features to their Web server can start with the Apache code and build on it. Indeed, some of Apacheís most important modules began as externally developed projects. mod_vhost_alias and mod_dav are both good examples.
To encourage this kind of external development, all binary distributions now come with a complete copy of the source code thatís ready to build. Examining the source code can be instructive and educational, and sometimes, it can even turn up a bugó such is the power of open peer review. When a bug is found in Apache, anyone can post a fix for it to the Internet and notify the Apache development team. This produces rapid development of the server and third-party modules, as well as faster fixes for any bugs discovered. Itís also a core reason for its reputation as a secure Web server.
The Apache License
Like the majority of source code available on the Internet, Apache is covered by a license permitting its distribution. Unlike the majority of source code, however, Apache uses its own license rather than the GNU Public License (GPL). Apacheís license is considerably more relaxed than the GPLóit permits a much broader range of commercial applications and makes only a few basic provisions.
Generally, if you intend to use Apache for your own purposes, you donít have anything to worry about. If you intend to distribute, rebadge, or sell a version of Apache or a product that includes Apache as a component, the license becomes relevant. This is an approximation and shouldnít be taken as generally applicableóif in doubt, read the license. The license for Apache is actually quite short and easily fits on a single page. Itís included in every source and binary distribution and is reproduced for convenience in Online Appendix C.
Keep in mind also that there are several third-party products that build on Apache, and those products have additional licenses of their own. Apacheís license may not apply to them, or it may apply only in part. Apache may be free, but proprietary extensions of it may not be.
Support for Apache
Apache isnít directly supported by the Apache Software Foundation (ASF), although itís possible to submit bugs and problem reports to them if all other avenues of information have been exhausted. As with most open-source projects, the best source of support is the informative but informal online community. For many applications, this is sufficient because Apacheís reliability record is such that emergency support issues donít often arise.
In particular, Apache servers donít need the emergency fixes that are common for certain other Windows-based Web servers. Given that Apache is more popular than all other Web servers combined, this says a lot about its resiliency (popularity statistics are available at http://www.netcraft.com/survey/).
However, if support is a concern, there are a few options available:
IBM: IBMís WebSphere product line uses Apache as its core component on AIX, Linux, Solaris, and Windows NT. IBM offers support on its own version of Apache, which it calls the IBM HTTPD Server.
Apple: Apple Computers integrated Apache into both its MacOS X Server and MacOS X desktop operating systems as a standard system component. Because MacOS X is based on a BSD Unix derivative, Apache on MacOS X is remarkably unchanged from a typical BSD or Linux installation.
Hewlett-Packard: The Hewlett-Packard Apache-based Web server v.2.0.0 on hp-ux 11.0 and 11i (PA-RISC) is available.
SuSE and Red Hat: The vendors of Linux-based distributions that incorporate Apache (for example, SuSE and Red Hat) offer support on their products, including support for Apache. As with most support services, the quality of this varies from vendor to vendor. Fortunately, and especially where Linux is concerned, researching the reliability of vendors online is easy; thereís usually no shortage of people offering their opinion.
ISPs and so on: The Internet Service Providers (ISPs) and system integrators who provide Apache support. You can find a list of these on the Apache Web site at http://www.apache.org/info/support.cgi. The number of ISPs that offer Apache-based servers has grown considerably in the past few years. The choices of Apache services offered by ISPs include dedicated servers and colocation, virtual servers, and hosted accounts. Different ISP packages offer varying degrees of control over Apache. Some will only allow minor configuration for a virtual host on a server administered by the ISP, and other options include a complete dedicated server over which you have complete control. The choice of convenience over flexibility is one you have to make.
This article is excerpted from Pro Apache by Peter Wainwright (Apress, 2004; ISBN 1590593006). Check it out at your favorite bookstore today. Buy this book now.