Ok, assuming you have
www.vhost.com, your user is called vhostuser and is in the Group web-group. The Doc-root starts at /var/www/
www.vhost.com/root/public_html/ in this sample.
This goes additionaly in the vhost apache conf:
Code: Select all
DocumentRoot /var/www/www.vhost.com/root/public_html
SuexecUserGroup vhost-user web-group
<Directory "/var/www/www.vhost.com/root/public_html/>
AddHandler fcgid-script .php
Options ExecCGI FollowSymLinks
allow from all
FCGIWrapper /var/www/www.vhost.com/cgi-bin/php .php
</Directory>
This is in /var/www/ww.vhost.com/cgi-bin/php:
Code: Select all
#!/bin/sh
PHPRC="/var/www/www.vhost.com/"
export PHPRC
PHP_FCGI_CHILDREN=8
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php5-cgi #Here you can also switch to php4
The php.ini can be placed at /var/www/
www.vhost.com/php.ini
and /etc/apache2/modules.d/20_mod_fcgid.conf looks like this:
Code: Select all
<IfDefine FCGID>
<IfModule !mod_fcgid.c>
LoadModule fcgid_module modules/mod_fcgid.so
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcg
IdleTimeout 1200
ProcessLifeTime 3600
IPCConnectTimeout 1200
IPCCommTimeout 900
</IfModule>
</IfDefine>
Hopefully this gives you an idea of how it can be done...
