I'm new to Linux and servers so please have patience. I did search for a solution, prior to posting this. I did find ONE question that was similar, but not the same and there was no solution so I am posting, asking in a different way, in hopes of finding the what's causing the problem as well as a solution to said problem.


"http://localhost/" will not display anything in browser after LAMP install.

I followed instructions to a "T" and everything installed properly. I can access, phpmyadmin, apache, etc. but when I try to view "localhost" in the browser, I literally get nothing but a blank white page.

I have added # ServerName localhost to the apache.conf file.

I am able to view localhost/phpmyadmin just fine but no http://localhost.



I found the solution.

I went to folder: /etc/apache2/sites-available/000-default.conf and changed this line: DocumentRoot /var/www/html to DocumentRoot /var/www

and then I went to file: /etc/apache2/apache2.conf and changed this line: <Directory /var/www/html> to <Directory /var/www/>

  • 1
    what version of Ubuntu are you using ? – George Udosen Dec 16 '16 at 12:13
  • I am using Ubuntu 16.04.1 and I was able to solve the issue. – Gregory Smitherman Dec 18 '16 at 8:48
  • Please note that the default home directory for apache on Ubuntu xenial xepus is /var/www/html – George Udosen Dec 18 '16 at 9:26
  • Was there an index.html file in HTML folder or in www folder ? – George Udosen Dec 18 '16 at 9:28
  • Yes, there is an html file. I changed the default home directory. – Gregory Smitherman Dec 20 '16 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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