Forum Moderators: phranque
Problem occurs when specify [sitename...]
By default, index.html should be served up. Until this weekend, that is what happened.
index.html and index.php both exist in the DocumentRoot dir. httpd serves up index.php by default and not index.html, despite the DirectoryIndex command.
Despite re-editing httpd.conf, saving, and restarting httpd, problem persists. index.html is served when referenced explicity, and if index.php is renamed,
index.html is served.
In access_log, I see the following:
with index.php present:
ip ... [date] "GET / HTTP/1.1" 200 25
ip ... [date] "GET /index.html HTTP/1.1" 200 1011
ip ... [date] "GET /index.php HTTP/1.1" 200 25
ip ... [date] "GET / HTTP/1.1" 200 25
After renaming index.php to index.foo, I get the
following:
ip ... [date] "GET / HTTP/1.1" 200 1011
ip ... [date] "GET / HTTP/1.1" 304 -
and any subsequent requests for directory or explicit reference to index.html give that same line.
I've gotten things to work by renaming index.php out of the way, but how can I really fix this problem? Other than the access_log, there are no error_log or system error messages. Any suggestions?
Welcome to WebmasterWorld!
The problem may be that php is given higher priority than mod_dir. In Apache 1.x, this could be caused if you added the php module to the end of the LoadModule list... It should be added at the beginning --or close to it-- to avoid this problem. Apache 2 reportedly has a new priority scheme to avoid this problem, but I'm not familiar enough with it to make a recommendation.
What changed 'last weekend"? There's the clue.
Jim