Chapter 10. Apache HTTP Server
127
10.2. Migrating Apache HTTP Server 1.3 Configuration Files
This section is for those migrating an Apache HTTP Server 1.3 configuration file to be utilized by
Apache HTTP Server 2.0.
If upgrading the to Red Hat Enterprise Linux 3 from Red Hat Enterprise Linux 2.1, then
the new stock configuration file for the Apache HTTP Server 2.0 package is installed as
and the original version 1.3
is not
/etc/httpd/conf/httpd.conf.rpmnew
httpd.conf
touched. It is, of course, 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.
If the
file is a modified version of the newly installed default and
/etc/httpd/conf/httpd.conf
a saved a copy of the original configuration file is available, it may be easiest to invoke the
diff
command, as in the following example:
diff -u httpd.conf.orig httpd.conf | less
This command highlights any modifications made. If a copy of the original file is not available, extract
it from an RPM package using the
and
commands, as in the following example:
rpm2cpio
cpio
rpm2cpio apache- version-number .i386.rpm | cpio -i --make
In the above command, replace
with the version number for the
version-number
apache
package.
Finally, it is useful to know that the Apache HTTP Server has a testing mode to check for configuration
errors. To use access it, type the following command:
apachectl configtest
10.2.1. Global Environment Configuration
The global environment section of the configuration file contains directives which affect the overall
operation of the Apache HTTP Server, such as the number of concurrent requests it can handle and
the locations of the various files. This section requires a large number of changes, as compared to
the others, and it is therefore recommended to base this section on the Apache HTTP Server 2.0
configuration file and migrate the old settings into it.
10.2.1.1. Interface and Port Binding
The
and
directives no longer exist; their functionality is now provided by a more
BindAddress
Port
flexible
directive.
Listen
If
was set in the 1.3 version configuration file, change it to
in the 2.0 configu-
Port 80
Listen 80
ration file. If
was set to some value other than 80, then append the port number to the contents
Port
of the
directive.
ServerName
For example, the following is a sample Apache HTTP Server 1.3 directive:
Port 123
ServerName www.example.com
To migrate this setting to Apache HTTP Server 2.0, use the following structure:
Listen 123
ServerName www.example.com:123
Need help?
Do you have a question about the ENTERPRISE LINUX 3 and is the answer not in the manual?
Questions and answers