View previous topic :: View next topic |
Author |
Message |
kaktuspalme n00b
Joined: 23 Apr 2006 Posts: 29
|
Posted: Fri Jun 01, 2007 9:58 pm Post subject: mod_fcgid-2.1-r1, suexec, php and apache-2.2 |
|
|
Hi, im searching and searching and searching...
I didn't find anything how to configure mod_fcgid with apache 2.2 and php and suexec, can anyone help me? Or can anyone post a sample config with the actual mod_fcgid-2.1-r1? I would like to make a tutorial if it works.
At the moment mod_fcgid with apache 2.2 and php works, but without a php.ini per vhost.
Sorry for this bad post, but on my systems its 12 o' clock at the moment
Sorry for my bad Englisch. |
|
Back to top |
|
|
nativemad Developer
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Sat Jun 09, 2007 10:11 am Post subject: |
|
|
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: | 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: |
#!/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: |
<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... |
|
Back to top |
|
|
kaktuspalme n00b
Joined: 23 Apr 2006 Posts: 29
|
Posted: Wed Jun 13, 2007 10:02 am Post subject: |
|
|
Really Really thanks, i will try it today and post if its work. |
|
Back to top |
|
|
nativemad Developer
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Wed Jul 04, 2007 2:55 pm Post subject: |
|
|
did it work for you? Or can i help further? |
|
Back to top |
|
|
|