Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hope you can help. This is my first time trying Ubuntu/Linux.

I am logged in as root I have downloaded and installed LAMP and PHPMYADMIN. I get the test page under localhost say that It works and is installed Correctly. I have also put my files in the /var/www. they are PHP files When I put the address localhost/(page name.php) I get an error saying

 Not Found

 The requested URL /index.php was not found on this server.
 Apache/2.2.22 (Ubuntu) Server at localhost Port 80

I Have put the files in the wrong folder?? If I look in the "/etc/ap[ache2/sites-available/default", It tells my my DocumentRoot is /var/www

Would love somehelp on this please

Many thanks GF

share|improve this question
How did you install LAMP and phpmyadmin? – th0th Sep 13 '12 at 13:42
Please edit your question to add the output of ll -L /var/www – SirCharlo Sep 13 '12 at 13:56
did you name you page name.php index.php cause as the error says can't find index.php – blade19899 Sep 13 '12 at 14:18

Check out error log (tail /var/log/apache2/error.log) in order to find out exact path that Apache tries to find.

share|improve this answer

I had the same problem and using the apache logs I've found that the solution is to place your php code inside /html folder so -

sudo mv /var/www/FILENAME.php /var/www/html
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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