Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 7183  / 2 Years ago, wed, january 12, 2022, 10:47:00

I just installed lamp here on my desktop. i am using 12.04. Installation works perfectly but when i tried to access localhost/wordpress/ it doest read the index.php. It shows like this:
enter image description here



Why is it happening? why my localhost doesnt read the index.php? I tried to create a dir and put an index.php there but again it shows the whole listing of directory and ignore my index.php. Please help. Thank you


More From » apache2

 Answers
4

You need to add a directive to your apache2 configuration or your .htaccess file. Like this...



DirectoryIndex index.php


...otherwise, it just defaults to index.html



Same thing if you wanted index.shtml, you'd need:



DirectoryIndex index.shtml

[#36001] Friday, January 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ateact

Total Points: 176
Total Questions: 130
Total Answers: 122

Location: Egypt
Member since Sun, Apr 23, 2023
1 Year ago
;