Before I installed Debian I used to have my Apache server set up as follows with three virtual hosts:
VHOST1: Local Intranet
VHOST2: WWW Server
VHOST3: WWW Server with SSL
I had PHP configured and working on all three Virtual Hosts using the suexec wrapper. Each Virtual Host had its php.ini file so I got around this problem by using a bash script to execute the PHP binary with my desired php.ini file.
All this aside I have now put Apache and PHP on my new Debian server. The suexec wrapper appears to be working fine and I can execute simple shell scripts. However, when I came to test PHP it dumped the contents of the script in my browser.
I then placed a copy of the actual PHP binary in my cgi-bin and attempted to request my PHP page again. This time however, it dumped the entire contents of the PHP binary into my browser.
PHP is working becuase calling the PHP binary directly gives me the old force-cgi-redirect error message. It just appears that Apache or suexec are refusing to execute PHP. I am completely bewildered by this problem. Here is a copy of my virtual host config:
# local network (intranet)
SuExecUserGroup phplocal phplocal
CustomLog logs/delves_s-access_log common env=!attack-attempt
# cgi config
ScriptAlias /cgi-bin/ "/home/web/local/cgi-bin/"
# php cgi config
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php
Allow from all
Any suggestions on what is causing this would be gladly welcomed. I have probably missed something really simple