Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running apache2 + php5.

When I go to, everything's fine.

When I got to (i.e., no specific file name), the server just serves the text of that PHP file, so the interpreter does not run. Why?

There's no other file in the web root directory.

What am I missing here?

share|improve this question
OK, this is becoming even more weird... Apparently the above behaviour is only displayed with Google Chrome. With Firefox and IE everything is working well. To summarize: When accessing my website at using IE or Firefox, the PHP script at index.php is executed fine. When accessing my website at using Chrome, the index.php is returned as a text file. When accessing, the PHP script is executed. How strange. – bosh Oct 13 '09 at 22:09
OK, apparently solved by clearing the Google Chrome cache. I guess there are times when hitting the refresh button on Chrome doesn't really work. – bosh Oct 13 '09 at 22:42

Make sure the DirectoryIndex directive includes index.php; otherwise it won't automatically go to that file.

share|improve this answer
The index.php is in the DirectoryIndex. That is the reason that the server fetches the file and serves it to the client. The problem is that it is not running the PHP interpreter on that file. Weird. – bosh Oct 13 '09 at 21:44

Your Answer


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.