Introduction
Related Files
Commands
Common Directives
Virtual Hosting by
The Apache web server is the crown jewel of the Open Source software movement. It costs nothing to obtain,
Apache is free software. If you bought (as opposed to downloaded) the version of Linux you are running, Apache is probably on the distribution disks somewhere. Lacking that, you can download the latest version and many of the add-ons at
http://www.apache.org
|
|
Apache may very well already be installed on your system, but don't grope around looking for a file named "apache"—it isn't there. For historical reasons the apache executable is a file called httpd. |
Organization
Apache is not a single file, but rather a collection of them. In addition to the httpd executable there is at least one configuration file (httpd.conf). Zero or more precompiled object files called
modules
may be dyanmically loaded in to the base httpd executable to provide additional functionality. Somewhere on the system, there should be a collection of Web page documents to be delivered by the server. For organizational reasons, all of these types of files are usually stored under a single directory, which is referred to as the
ServerRoot.
In fact, Apache requires a valid ServerRoot directory in order to function properly. Though the exact
|
conf |
configuration files |
|
logs |
apache logs |
|
htdocs |
static web page files |
|
cgi-bin |
cgi scripts and binaries |
Directives
The behavior of Apache is largely controlled by the values of
Ninety percent of the administration of apache is knowing what the directives are and how to set them.
The apachectl script
Apache's configuration files are read only at startup time. If you make a change to an apache directive, you must restart the server in order for the changes to take effect. The recommended method for restarting the server is to use the apachectl script:
apachectl restart
Before attempting to restart the httpd daemon, it's a good idea to check that your new configuration is valid. This can also be done with the apachectl script:
apachectl configtest
Virtual Host ing
Virtual Hosting
is the practice of configuring your server so that it responds to
|
httpd |
This is the Apache executable file. |
|
httpd.conf |
This is the main configuration file. It contains the
|
|
srm.comf |
srm stands for Server Resource Management. Historically, this file contained the variables that specifed how server resources were to be used. These days, you will usually find all directives in the httpd.conf file. |
|
access.conf |
Historically, this file contained the variables relating to access control. These days, you will usually find all directives in the httpd.conf file. |
|
apachectl |
A script used to stop, start, and restart Apache. |