custom php5 install for multiple domains
Posted by: morgan
Posted on: 2006-01-10 05:44:00
I maintain several websites in my account, and I'd like to have the control that comes with managing my own php5 install. However, I don't want to have to install and maintain a separate version of php5 in each separate website directory.
In order to do a custom php5 install, it appears that you install the CGI within the site directory and then modify .htaccess to use that CGI to process .php files as follows:
/home/username/mywebsite.com/cgi-bin/ [php.cgi goes here]
Then in .htaccess:
AddHandler php-file .php
Action php-file /cgi-bin/php.cgi
I've read the Apache mod_actions documentation and I believe that the URI in the Action directive can only refer to directories below the webroot for the given domain.
What I want to know: is there a way to have my .php scripts handled by a php.cgi that is *outside* of the webroot. If this were possible then I could install php5 once in a location such as:
/home/username/php/
and then for each of my websites e.g.:
/home/username/website1.com/
/home/username/website2.com/
...
I could in the .htaccess file in each domain specify something like:
AddHandler php-file .php
Actino php-file /home/username/php/php.cgi
Does anyone know if this is possible?
Thanks,
Morgan