I have a rails setup which is served by Apache Passenger, there are 2 apps on the server which are served by passenger and all was working fine. I then wanted to install wordpress on the same server and so I installed the required packages "php5 php5-mysql libapache2-mod-php" and setup a separate vhost for wordpress, when I try to run the wordpress index.php file, apache doesn't execute but rather offers me to download.
I have googled this to no resolution, this problem is pretty common but none of the solutions have worked for me. Solutions that I have tried:
Adding "AddType application/x-httpd-php .php" in apache2.conf
making the wordpress directory executable, also changed the owner of the directory to www-data
In the vhost of wordpress, disabled Passenger by setting PassengerEnabled Off in the Directory directive.
Verified that php module is loaded by apache2ctl -M
Checked error log and nothing there, enabled error log for that vhost but nothing there.
any pointers, help appreciated thanks. BTW, the same setup works on local development box, its just this instance being painful can't recreate things from scratch.