So I just did a custom PHP 5.3.3 install with the instructions on this page (only I used 5.3.3 instead of 5.3.1). I used the script for “Improved script for a minimal PHP 5.3.x install with APC”.
Everything seems to be working fine, and everything in my website root is being parsed by 5.3.3. However, I need to change my web root to a subdirectory.
mydomain.com/ <-- web root
.htaccess <-- tells the server to use the cgi-bin/php.cgi
webroot/ <-- web root
The contents of my .htaccess file are:
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
#Deny access to the PHP CGI executable and config files
Deny from All
Allow from env=REDIRECT_STATUS
Now obviously I’d need to somehow modify this to point to the cgi-bin, which would now be outside of the web root. However, the path to php.cgi is relative to the web root (why?). How would I go about configuring my .htaccess file to allow this setup?
Thanks in advance.