简体   繁体   中英

Apache2 isn't serving index.php

My server is fairly old (based on SuSE 9), and while I try to go through the pain of updating to the latest Apache2, PHP5 and MySQL, I ran into this problem with one of my hosted domains.

The site has an index.php, and if I browse to their site example.org/index.php it displays fine.

But if I navigate to http://example.org or http://example.org/ , Firefox pops up a dialog asking if I want to save the file or view it in a program. The downloaded file is a copy of the unprocessed index.php file.

The config file for the domain has not changed, but clearly I messed up something. In the config file is "DirectoryIndex index.php". In the DocumentRoot is a .htaccess file with only "XBitHack on".

Confusing the matter is that I have another hosted domain with a Wordpress install that also uses index.php, and navigating there works just fine.

Here's the site: http://www.sjbridge.org or http://www.sjbridge.org/index.php

Mojo

Here's some more information: When I navigate to http://www.sjbridge.org , Firefox presents the file as "application/x-httpd-php" in the content-type, but for /index.php the content-type is, of course, text/html.

Ugh, I cleared the cache in my browser and the problem went away. Let me say "Never mind."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM