开发者

Server Downloading File Instead Of Showing It

I have a Apache server running at Rackspace Cloud Hosting, so I've installed Wordpress manually(setting up the database, wget the latest.zip...) and placed it at /var/www, but now when I try to access it for the first time, it downloads a strange file with the IP as name instead of showing me the Wordpress Installation.

开发者_运维技巧PS: The same happens if I place it on a sub-directory like blog


I think you haven't configured Apache to execute PHP (mod_php?) Right now it's just serving your PHP files like any old file type so what you're getting is your wordpress index.php as a file download.

I'm not sure what the process is for Rackspace, but usually this would mean enabling mod_php.

Do you have any other PHP files that work on that site?


you need to tell Apache to excuate php files. add the following to your Apache configuration file:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .php

make sure PHP module is included in Apache configuration first!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜