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
Today, after I upgraded my Ubuntu to 14. 04 the localhost server doesn't work any longer and shows index of/ page instead
I have tried to reinstall everything (including php5, phpMyAdmin, and MySQL) but the problem is still there. How do I fix this?
1 Answer
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.confBy default DocumentRoot is as below:
DocumentRoot /var/www/htmlYou 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