Upgrading from a Previous Version of Apache

If you're upgrading Red Hat Linux and Apache (including any version of the Red Hat Linux Secure Web Server), you'll need to be aware of two issues:

Where is the DocumentRoot?

Basically, the DocumentRoot is the directory on your system which holds most of the Web pages served by your Apache Web server. The DocumentRoot is set by a configuration directive in Apache's configuration file, httpd.conf. If you're unfamiliar with the DocumentRoot configuration directive, see the section called DocumentRoot in Chapter 12 for a more detailed explanation.

In previous versions of the Apache Web server shipped with Red Hat Linux, the DocumentRoot was /home/httpd/html. In the default (non-secure) version of Apache's configuration file, the DocumentRoot is /usr/local/apache/htdocs. It is also possible that you (or a predecessor) used an entirely different DocumentRoot. The important point is — in Red Hat Linux 7.0 the DocumentRoot is now, by default, /var/www/html.

Does this matter to you? It does, if you used a previous version of Apache to serve Web pages. Any Web pages that were previously served from a different DocumentRoot will not be found (or served) by the Apache shipped with Red Hat Linux 7.0 in its default configuration. You'll need to take one of the following steps:

Move all of the files in the old DocumentRoot (/home/httpd/html, /usr/local/apache/htdocs, or wherever) to the new one (/var/www/html).

or

Edit the Apache configuration file and change all references to the DocumentRoot back to the old directory path.

The solution you choose depends upon your system's configuration. Generally, if you automount /home on your system, you won't want to have your DocumentRoot in /home. On the other hand, if you don't have much space in /var, then you probably won't want your DocumentRoot in /var. You, or your system administrator, will have to decide the best solution based on your system's configuration and your Web server's needs. The Red Hat Linux Secure Web Server's default configuration is intended to address the needs of most webmasters; unfortunately, we can't configure it for everyone's individual situation.

What Happens to My Old Configuration File?

If you had another version of Apache installed and you customized its configuration files, the configuration files will be saved in their directory with an extension of .rpmsave during the installation of Apache. If you had another version of Apache installed but you never altered its configuration files, they will be written over during the installation of this product.

After installing Apache, you can cut and paste your customizations from your old Apache configuration file (httpd.conf.rpmsave) into the newly installed httpd.conf configuration file for your secure server.