I installed apache2 on my Ubuntu 13.10 and it works without any problems. I can see the default index page (which is located in /var/www/index.html) by typing localhost/ in the address bar

Apache default page

Today, after I upgraded my Ubuntu to 14. 04 the localhost server doesn't work any longer and shows index of/ page instead

Apache index listing

I have tried to reinstall everything (including php5, phpMyAdmin, and MySQL) but the problem is still there. How do I fix this?


You should edit the 000-default.conf file

To edit 000-default.conf you can open it in a text editor with root permission, for example:

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

By default DocumentRoot is as below:

DocumentRoot /var/www/html

You need to change the DocumentRoot to:

DocumentRoot /var/www/

Save the file and exit.

After this you must restart your Apache server:

sudo /etc/init.d/apache2 restart

Not the answer you're looking for? Browse other questions tagged or ask your own question.