Server Downloading File Instead Of Showing It

2019-08-13 01:05发布

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

2条回答
欢心
2楼-- · 2019-08-13 01:44

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!

查看更多
该账号已被封号
3楼-- · 2019-08-13 01:48

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?

查看更多
登录 后发表回答