Apache will not display index in web root, subfolders are fine

apache-2.2directorydirectoryindex

I have an Apache 2.2.3 server running on CentOS 5.5. In the root of my web directory, there is an index.html file.

Going to something like, say, www.exampledomain.egg/index.html works, but going to www.exampledomain.egg/ displays a completely blank page. I've double checked the DirectoryIndex option and still, nothing.

It seems as if this only affects the root of the domain. If there is a subdirectory, like www.exampledomain.egg/iamafolder/, that will display its own DirectoryIndex as normal.

Here's what I have in the .htaccess file:

DirectoryIndex index.html index.txt index.php

Best Answer

Check the apache access log file to see that you are indeed requesting the correct file. Also check the index file for any run-away tags (e.g. missing </head> that could cause the whole document to be parsed as header information only.)