Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
2  
If you click on the index.php file does it display your wordpress? –  Goddard Aug 23 '12 at 6:48
add comment

2 Answers 2

up vote 2 down vote accepted

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
share|improve this answer
    
Where is the location on .htaccess file is? –  thenewbie Aug 24 '12 at 1:34
    
Usually below the directory where your .html files are kept. There are directives to set this as well. Some Googling for apache2 configuration will help with this. –  fyngyrz Aug 25 '12 at 9:41
add comment

changing the public_html folder's/htdocs folder permissions to 755 will solve this problem. I suddenly changed the permissions of my blog and this happened with me. I have searched a lot but in vain. Finally I got it and solved this issue.

share|improve this answer
add comment

Your Answer

 
discard

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.