Can't find Localhost files
Solution 1
Check out error log (tail /var/log/apache2/error.log
) in order to find out exact path that Apache tries to find.
Solution 2
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
Related videos on Youtube
GMF
Updated on September 18, 2022Comments
-
GMF over 1 year
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 sayingNot 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 myDocumentRoot
is/var/www
Would love somehelp on this please
Many thanks GF
-
Gokhan Sari over 11 yearsHow did you install LAMP and phpmyadmin?
-
SirCharlo over 11 yearsPlease edit your question to add the output of
ll -L /var/www
-
blade19899 over 11 yearsdid you name you
page name.php
index.php
cause as the error says can't findindex.php
-