2

I'm installing Wordpress and getting the problem where it doesn't find index.php. Of course, if I type it explicitly then it's fine. The problem is somehow that DirectoryIndex is not right. I look in mods-enabled/dir.conf and it says:

<IfModule mod_dir.c>
  DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

Which appears to be correct. But it doesn't work. I thought maybe some other file somewhere is overriding this but if so, it isn't in mods-enabled as I grepped that folder.

Any ideas?

zsimpson
  • 695
  • 2
  • 7
  • 12
  • 1
    Is mod_dir actually loaded? More likely to be caused by a bogus rewriterule preventing mod_dir from ever seeing a request for a directory. – covener Feb 19 '12 at 15:49
  • Possible duplicate of [DirectoryIndex doesn't work](https://stackoverflow.com/questions/6509549/directoryindex-doesnt-work) – Liam Jan 29 '18 at 12:55

1 Answers1

0

I think mod_dir isn't loaded,try to command "sudo a2enmod dir" and "service apache2 restart"

shadowman
  • 11
  • 1