How to get back to Apache 2.2 after accidentally installing Apache 2.4

apache-2.2ubuntu-12.04

I have carelessly installed the following package: ppa:ondrej/php5 on a Ubuntu 12.04 LTS server.

It turns out that it comes with an upgrade from Apache 2.2 to Apache 2.4, breaking the existing installation.

I've already removed the package, but that was not enough to restore the site. What more do I need to do to recover?

Best Answer

You should be a little more clear about what is going wrong now; post output from apache2ctl -t and relevant lines from the Apache error log.

if by "I've removed the package", you mean the ppa:ondrej/php5 one, then you still have to remove apache-2.4 and install 2.2. Before doing this, I would backup /etc/apache2 (cp -a /etc/apache2 /etc/apache2.bak). Then, it may still not work because the configuration files may have changed. It may be wise to look at /etc/apache2 and see if you can see .dist-old (or something) files. Those would/could be the config files as they were before you installed 2.4.

BTW, do you have backups and/or have your /etc in git or bzr? Then it's easy enough to restore /etc/apache2.