Why is my Apache not working after upgrading to Ubuntu 14.04?

Solution 1:

I had this problem even though apache was working for me. I simply wanted to do a quick

$ /usr/sbin/apache2 -V

to find the value of SERVER_CONFIG_FILE. Because that's not the way to start apache2 any more it fails with the errors the OP posts. A quick and dirty workaround is simply to set the envvars that are missing first:

$ source /etc/apache2/envvars
$ /usr/sbin/apache2 -V

This sets the APACHE_LOCK_DIR variable and all is well (-D SERVER_CONFIG_FILE="apache2.conf").

Solution 2:

I had this problem : The cause is in the file

/etc/apache2/sites-available/000-default.conf 

where the root have changed:

before upgrade = /var/www
after upgrade = /var/www/html

So edit to modify this file

sudo gedit /etc/apache2/sites-available/000-default.conf

And restart apache

sudo service apache2 restart