Project:Apache/Upgrading

This document describes the procedure end-users should follow to safely upgrade their apache installation.

Upgrading from <2.2.6-r4
The Apache ebuilds have used for a very long time to select the built-in modules during compile time. However, this behavior has several disadvantages: To rectify this situation has been deprecated and migrated to the new     variable. To convert your custom module selection to the new format use the following command:
 * Selecting built-in modules during the initial merge is not possible
 * Portage does not know which modules have been installed. This is especially annoying for binary packages.
 * Portage will try to overwrite on every upgrade

Additionally to the new  the local USE flags have been cleaned up: For a detailed description of old and corresponding new USE flags see below.
 * All MPM USE flags have been moved to the     variable
 * is now
 * is now

Introduction
The state of Apache and its modules in Gentoo was becoming dismal. There were a number of problems that caused support problems and made maintaining everything the Apache herd is responsible for difficult: This document details how to upgrade without breaking your system. If you are a developer or would like to know what we changed, or how ebuilds need to be modified to take advantage of our eclass, then check the Apache Developer Reference.
 * The configuration that came with Gentoo was dramatically different from the upstream configuration that most users expect
 * Many modules used similar code, but all did things their own way
 * Most modules weren't maintained very well - mostly because of the large number of modules available
 * Modules didn't have a configuration standard
 * Some modules could support both versions of Apache, but the ebuilds didn't handle that
 * Choices available in Apache were not available for Gentoo users (for example MPMs)
 * Bugs for Apache were stacking up

Upgrading
There have been many changes to how Apache works within Gentoo. Every package that is directly related to Apache needs to be updated and some things that worked previously will no longer work.

First you need to figure out what packages you need to upgrade. You can do this using the  tool, which is part of the   package.

Many webapps aren't affected in any way as most use the  eclass which takes care of installing them correctly. You may want to check to see if there is a new revision.

As we have added some new USE flags, you may want to review them and add appropriate lines to. See below for more details.

Now you need to reconfigure Apache and its modules. Start by using  or   to update the  and  files. You will notice that your apache configuration files won't show up in the updates - this is because all the configuration files have moved.

If you have made changes to the previous default and  you will need to migrate your changes to. Also configuration locations for modules and virtual hosts have changed -- they are now located in and  respectively.

When you have finished migrating your changes to the new configuration file, you will need to delete the old configuration files (or move them to a safe place). The new checks for these files and doesn't let you start apache unless you have removed them, indicating that you have reconfigured apache using the new paths.

Now you may restart apache.

If you run into any problems check the Apache Troubleshooting Guide and if that doesn't solve the issue, please report it on Gentoo Bugzilla. Be sure to include the modules you have enabled and (if you are using Apache 2) what MPM USE flag you compiled with (if any). You may also join for support.

Supported USE flags in <2.2.6-r4
There are USE flags that are local to apache and its modules. Apache supports several other more generic USE flags such as , but the effect they have on apache doesn't differ much from the effect is has elsewhere, so it's not included in this list. Run a  to see the full listing of supported USE flags.

Supported USE flags in 2.2.6-r4 and above
With the advent of  a general cleanup of USE flags was necessary. The following table lists supported USE flags for  and above as well as their equivalent in previous versions.

The following table lists supported  as of   and their corresponding previous local USE flag.

The following table lists supported  as of.