Upgrading Apache from 2.2 to 2.4 (Ubuntu Precise to Trusty)

There are a few significant changes between Ubuntu Precise (12.04) and Trusty (14.04) with regard to Apache2 which may cause some headaches if you aren’t prepared to troubleshoot them.

conf.d to conf-enabled

/etc/apache2/conf.d is no longer sourced by apache.2conf.  Instead, conf files are now using the *-available and *-enabled scheme that modules and sites use.  You may need to port old configs over from conf.d to conf-available/enabled if you had anything non-default in there.

site names require “.conf” at the end now

Previously, any files in sites-enabled was loaded into Apache.  Now, apache2.conf has been changed slightly to only load sites configs ending in the name “.conf”

IncludeOptional sites-enabled/*.conf

access control has changed

The access control syntax has changed between versions.  For example,

Order allow,deny
Allow from all

is now written simply as

Require all granted

The updated apache2.conf  in Trusty also contains some default permissions which may or may not alter the way your existing vhosts behave, but these are easily adjusted.

There are many more changes as well, which are documented on the apache.org website: http://httpd.apache.org/docs/2.4/upgrading.html

Leave a Reply