10.2. Migrating Apache HTTP Server 1.3 Configuration Files
/etc/httpd/conf/httpd.conf.rpmnewand the original version 1.3
httpd.confis left untouched. It is entirely up to you whether to use the new configuration file and migrate the old settings to it, or use the existing file as a base and modify it to suit; however, some parts of the file have changed more than others and a mixed approach is generally the best. The stock configuration files for both version 1.3 and 2.0 are divided into three sections.
/etc/httpd/conf/httpd.conffile is a modified version of the newly installed default and a saved a copy of the original configuration file is available, it may be easiest to invoke the
diffcommand, as in the following example (logged in as root):
diff -u httpd.conf.orig httpd.conf | less
cpiocommands, as in the following example:
rpm2cpio apache-<version-number>.i386.rpm | cpio -i --make
10.2.1. Global Environment Configuration
10.2.1.1. Interface and Port Binding
Portdirectives no longer exist; their functionality is now provided by a more flexible
Port 80was set in the 1.3 version configuration file, change it to
Listen 80in the 2.0 configuration file. If
Portwas set to some value other than 80, then append the port number to the contents of the
Port 123 ServerName www.example.com
Listen123 ServerName www.example.com:
10.2.1.2. Server-Pool Size Regulation
perchild. Currently only the
workerMPMs are available, although the
perchildMPM may be available at a later date.
preforkMPM accepts the same directives as Apache HTTP Server 1.3, so the following directives may be migrated directly:
workerMPM implements a multi-process, multi-threaded server providing greater scalability. When using this MPM, requests are handled by threads, conserving system resources and allowing large numbers of requests to be served efficiently. Although some of the directives accepted by the
workerMPM are the same as those accepted by the
preforkMPM, the values for those directives should not be transfered directly from an Apache HTTP Server 1.3 installation. It is best to instead use the default values as a guide, then experiment to determine what values work best.
workerMPM, create the file
/etc/sysconfig/httpdand add the following directive:
10.2.1.3. Dynamic Shared Object (DSO) Support
ClearModuleListdirectives no longer exist. These directives where used to ensure that modules could be enabled in the correct order. The Apache HTTP Server 2.0 API allows modules to specify their ordering, eliminating the need for these two directives.
- The order of the
LoadModulelines are no longer relevant in most cases.
- Many modules have been added, removed, renamed, split up, or incorporated into others.
LoadModulelines for modules packaged in their own RPMs (
mod_perl, and the like) are no longer necessary as they can be found in their relevant files within the
- The various
HAVE_XXXdefinitions are no longer defined.
httpd.confcontains the following directive:
10.2.1.4. Other Global Environment Changes
ServerType— The Apache HTTP Server can only be run as
ServerType standalonemaking this directive irrelevant.
ResourceConfig— These directives have been removed as they mirror the functionality of the
Includedirective. If the
ResourceConfigdirectives are set, replace them with
Includedirectives.To ensure that the files are read in the order implied by the older directives, the
Includedirectives should be placed at the end of the
httpd.conf, with the one corresponding to
ResourceConfigpreceding the one corresponding to
AccessConfig. If using the default values, include them explicitly as