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.
- Copy old /etc/apache2 dir and /etc/conf.d/apache2 to some safe space, they will be overwritten with different structure so it is good to keep them to check later
- Emerge apache2
- Update the configuration files (etc-update)
- Emerge php
- Update the configuration files
Restart Apache (/etc/init.d/apache2 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:
- Check if APACHE_OPTS (in /etc/conf.d/apache2) contains „-D SVN -D SVN_AUTHZ -D DAV -D DAV_FS“ if not – add them, restart Apache
- 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/modules.d/47_mod_dav_svn.conf. If they are different (mine were) copy the saved over the new one. Restart the server
- 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.
This article is for people who have always newest software on their server.