Ye Lin Kyaw Random Thoughts

Apache 2.2 to 2.4 with Ubuntu 13.10

After my servers were upgraded with Ubuntu Server 13.10, all are stopped working. Ubuntu Server 13.10 came with Apache 2.4.*. That makes a busy day for the system administrators. Apache 2.4 will not work with 2.2 configuration file, the easiest way is using the default config files of Apache 2.4 and manually merging with the existing config file.

#   /etc/apache2/
#   |-- apache2.conf
#   |   `--  ports.conf
#   |-- mods-enabled
#   |   |-- *.load
#   |   `-- *.conf
#   |-- conf-enabled
#   |   `-- *.conf
#   `-- sites-enabled
#       `-- *.conf

By using the default config file, the Apache server is started working. But one more issue is waiting, only the default server is working and all of the virtual host are seen to be down. According to the new configuration file, the the enabled virtual host config files need to be under sites-enabled directory and these files mush have .conf extension. The simplest way is deleting all virtual host config files under sites-enabled, rename the existing config files under sites-available with extension .conf and re-enable with a2ensite command.

sudo a2ensite

One more issue is coming out again. After reloading with new virtual host configs, the hosts are seen to be working but showing the permission denied error. The Apache 2.4 upgrade manual said some of the directive has been changed. All of the access control directives from the virtual host config and .htaccess files are needed to change to newer directives.

Apache Error Log:

[authz_core:error] [pid 5163] [client] AH01630: client denied by server configuration:

Apache 2.2.*

Order deny,allow Deny from all

Apache 2.4.*

Require all denied

Apache 2.2.*

Order allow,deny Allow from all

Apache 2.4.*

Require all granted

Apache 2.2.*

Order Deny,Allow Deny from all Allow from

Apache 2.4.*

Require host