Apache problems after upgrading to Yosemite

Please also note that the Yosemite installer overwrites the entire /private/etc/apache2/httpd.conf file with the new default Apache 2.4 configuration file.

For example, if any Listen directives were added, they will have disappeared and need to be added again. E.g.:

Listen 127.0.0.1:81

I found my old configuration in the following file, but due to differences from 2.2, it should probably not be copied directly over the http.conf file:

/private/etc/apache2/httpd.conf~previous

There is an upgrade guide at: http://httpd.apache.org/docs/2.4/upgrading.html

Make sure that any previously included extra config files are still included, and then test the configuration with the command:

sudo apachectl configtest

The problem occurs because Yosemite installs the latest version of Apache (2.4) whereas earlier versions of Mac OS X used Apache version 2.2

From the error, it appears that you were not using the standard version of PHP provided by Apple but a different version supplied by liip.ch. Removing the # sign as suggested by Nuttyx above will load the Apple version of php (5.5.14). If you wish to continue running the version supplied by liip you will need to reinstall it so that it loads properly in Apache 2.4. See a detailed explanation here: (http://blog.liip.ch/archive/2014/06/11/php-osx-available-for-os-x-10-10-yosemite.html)

N.B. If you are using virtual hosts you will probably need to change your configuration files somewhat. In particular you will need to change the following:

2.2 configuration:

Order allow,deny
Allow from all

2.4 configuration:

Require all granted

It seems that you can fix this by removing the # at the beggining of the following line in /etc/apache2/httpd.conf file:

LoadModule php5_module libexec/apache2/libphp5.so