Chapter 24. Apache HTTP Server Configuration

Chapter 24. Apache HTTP Server Configuration

24.1. Basic Settings
24.2. Default Settings
24.2.1. Site Configuration
24.2.2. Logging
24.2.3. Environment Variables
24.2.4. Directories
24.3. Virtual Hosts Settings
24.3.1. Adding and Editing a Virtual Host
24.4. Server Settings
24.5. Performance Tuning
24.6. Saving Your Settings
24.7. Additional Resources
24.7.1. Installed Documentation
24.7.2. Useful Websites
24.7.3. Related Books

Red Hat Enterprise Linux provides version 2.0 of the Apache HTTP Server. If you want to migrate an existing configuration file by hand, refer to the migration guide at /usr/share/doc/httpd-<ver>/migration.html or the Red Hat Enterprise Linux Reference Guide for details.

If you configured the Apache HTTP Server with the HTTP Configuration Tool in previous versions of Red Hat Enterprise Linux and then performed an upgrade, you can use the HTTP Configuration Tool to migrate the configuration file to the new format for version 2.0. Start the HTTP Configuration Tool, make any changes to the configuration, and save it. The configuration file saved will be compatible with version 2.0.

The httpd and system-config-httpd RPM packages need to be installed to use the HTTP Configuration Tool. It also requires the X Window System and root access. To start the application, go to the Main Menu Button => System Settings => Server Settings => HTTP or type the command system-config-httpd at a shell prompt (for example, in an XTerm or GNOME Terminal).

The HTTP Configuration Tool allows you to configure the /etc/httpd/conf/httpd.conf configuration file for the Apache HTTP Server. It does not use the old srm.conf or access.conf configuration files; leave them empty. Through the graphical interface, you can configure directives such as virtual hosts, logging attributes, and maximum number of connections.

Only modules provided with Red Hat Enterprise Linux can be configured with the HTTP Configuration Tool. If additional modules are installed, they can not be configured using this tool.

Caution

Do not edit the /etc/httpd/conf/httpd.conf configuration file by hand if you wish to use this tool. The HTTP Configuration Tool generates this file after you save your changes and exit the program. If you want to add additional modules or configuration options that are not available in HTTP Configuration Tool, you cannot use this tool.

The general steps for configuring the Apache HTTP Server using the HTTP Configuration Tool are as follows:

  1. Configure the basic settings under the Main tab.

  2. Click on the Virtual Hosts tab and configure the default settings.

  3. Under the Virtual Hosts tab, configure the Default Virtual Host.

  4. To serve more than one URL or virtual host, add any additional virtual hosts.

  5. Configure the server settings under the Server tab.

  6. Configure the connections settings under the Performance Tuning tab.

  7. Copy all necessary files to the DocumentRoot and cgi-bin directories.

  8. Exit the application and select to save your settings.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-4 because CentOS-4 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-4 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.