Apache 2.4 Upgrade on Debian

Posted on August 5, 2013

After spending an hour or so on getting my old configuration to work with the Apache 2.4 package from Debian I decided to share my experiences in a little how to. There are changes both from upstream and in the Debian packaging. IMO it has all changed for the better, but it was quite annoying to get everything to work. So, here’s my how-to:

Step 1. Read Debian’s summary of the most important changes:

zless /usr/share/doc/apache2/NEWS.Debian.gz

Step 2. Move your configuration. In Debian’s customized version of Apache 2.2 the user-made configuration was supposed to be stored in /etc/apache2/conf.d. This directory is no longer read. Instead, /etc/apache2/conf-available should be used, and the configuration should enabled with the a2enconf command (analoguous to the site* and mod* commands and directories). Also note that all the configuration files must end with “.conf” in 2.4.

Step 3. Rename and enable your VHosts. Check that your VHosts got renamed to end with “.conf”, if not then rename them. You’ll also have to re-enable them with a2ensite.

Step 4. Try to start Apache. You’ll likely have problems with configuration directives that are not recognized. This happens for two reasons: First, the upgrade process disables a lot of modules, and second some directives have been changed in Apache 2.4. For example:

Hopefully, after some restarting and fixing stuff you will get Apache running again :)

Post a comment

Name:
E-mail:
(optional, used to generate user icon)
Web site:
Leave blank:
Comment: