Upgrade to Apache 2.2 on Gentoo (PHP5 SVN SSL)

How to easily upgrade Apache 2.2 running PHP5 and SVN with SSL under Gentoo.

Recently I've upgraded the Apache on my gentoo server from 2.0 to 2.2.

Because it looked like just the minor change in numbers I ahven't even read the documentation. Silly me.

Everything stopped. SSL, SVN and even PHP. Mainly because configuration files are changed and it's upgrade is destroying some of the old settings. Someone said that it should be name Apache 3.0, from the configuration point of view – I have to agree.

Here are the steps one should take to make the whole process successful.

  1. Copy old /etc/apache2 dir and /etc/conf.d/a­pache2 to some safe space, they will be overwritten with different structure so it is good to keep them to check later
  2. Emerge apache2
  3. Update the configuration files (etc-update)
  4. Emerge php
  5. Update the configuration files

Restart Apache (/etc/init.d/a­pache2 restart) and check if PHP sites are working. If not – edit the /etc/conf.d/apache2 file and put „-D PHP5“ on the end of APACHE_OPTS string, again restart Apache

If your Apache Subversion server is not working (and it was using DAV module) do following:

  1. Check if APACHE_OPTS (in /etc/conf.d/a­pache2) contains „-D SVN -D SVN_AUTHZ -D DAV -D DAV_FS“ if not – add them, restart Apache
  2. If the SVN is still not working compare the dav_svn configuration files with the saved ones on the beginning. In my system they are in file /etc/apache2/mo­dules.d/47_mod_da­v_svn.conf. If they are different (mine were) copy the saved over the new one. Restart the server
  3. If your face still is not forming into a „happy banana shape“ upgrade neon (emerge net-misc/neon) and obviously – restart Apache.

That's all I've done. Everything is working great.

I actually upgraded also openssl and subversion packages, but I don't think it was necessary.

Happy upgrading!

Update:

This article is for people who have always newest software on their server.

Trackback URL for this post:

http://piotr.zalewa.info/trackback/38