Chapter 14. Apache Directives and Modules

Apache's default configuration should work for most users. You may never need to change any of Apache's configuration directives. If you do want to change any of the default configuration options, you will need to know what some of the options are and where to find them. This chapter covers the configuration options available to you.

WarningWarning
 

If you plan to use the Apache Configuration Tool, a GUI utility provided with Red Hat Linux, you must not edit your Apache Web server's httpd.conf configuration file. Conversely, if you want to edit httpd.conf by hand, do not use the Apache Configuration Tool.

If you need more information on the Apache Configuration Tool, please see the Official Red Hat Linux Customization Guide.

After you have installed the apache package, the Apache Web server's documentation is available at http://your_domain/manual/ or you can use the Apache documentation available on the Web at http://httpd.apache.org/docs/. The Apache Web server's documentation contains a full list and complete descriptions of all of Apache's configuration options. For your convenience, this chapter provides short descriptions of the configuration directives used in the version of Apache provided with Red Hat Linux.

When you are reading your Web server's configuration file, be aware that it includes both a non-secure and a secure Web server. The secure Web server runs as a virtual host, which is also configured in the httpd.conf file. For more information about virtual hosts, see the section called Using Virtual Hosts.

NoteNote
 

We do not include FrontPage extensions, because the Microsoft™ license prohibits the inclusion of the extensions in a third party product.

Starting and Stopping httpd

During the installation process, a Bourne shell script named httpd was saved in /etc/rc.d/init.d. To manually stop and start your server, run httpd with either stop or start as an argument.

To start your server, type the command:

/etc/rc.d/init.d/httpd start

If you are running Apache as a secure server, you will be prompted to fill in your password. After you type it in, your server will start.

To stop your server, type the command:

/etc/rc.d/init.d/httpd stop

The command restart is a shorthand way of stopping and then starting your server. The restart command explicitly stops and then starts your server, so you will be prompted for your password if you are running Apache as a secure server. The restart command looks like the following:

/etc/rc.d/init.d/httpd restart

If you just finished editing something in your httpd.conf file, you do not need to explicitly stop and start your server. Instead, you may use the reload command. When you use reload, you will not need to type in your password (which is required if you are running Apache as a secure server). Your password will remain cached across reloads, but it will not be cached between stops and starts. The reload command looks like the following:

/etc/rc.d/init.d/httpd reload

By default, the httpd process will start automatically when your machine boots. If you are running Apache as a secure server, you will be prompted for the secure server's password after the machine boots, unless you generated a key for your secure server without password protection.