You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "--[ UxBoD ]--" <ux...@splatnix.net> on 2011/05/13 09:46:53 UTC

[users@httpd] Help with SuExec and FastCGI

Hi,

After having real issues with Apaches 2.2 Chroot feature and Joomla I am going to see if I have better luck with SuExec and FCGI.  I believe I have it configured correctly but am receiving the following error:

[Fri May 13 08:29:29 2011] [warn] [client XXXXXXXXXXX] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Fri May 13 08:29:29 2011] [error] [client XXXXXXXXXX] Premature end of script headers: test.php

Within my vhost configuration I have set:

<VirtualHost *:80>

    ServerAdmin webmaster@somehost.co.uk
    ServerName www.somehost.co.uk
    DocumentRoot /www/beta.somehost.co.uk/www

   <IfModule mod_fcgid.c>

      SuexecUserGroup somehost.co.uk somehost.co.uk

      <Directory /www/beta.somehost.co.uk/www/>
         AddHandler fcgid-script .php
         FCGIWrapper /www/fcgi-scripts/somehost.co.uk/php.fcgi .php
         Order deny,allow
         Allow from all
         AllowOverride All
         Options +ExecCGI
      </Directory>

   </IfModule>

</VirtualHost>

and the contents of php.fcgi:

#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
export PHPRC=/etc
exec /usr/local/php/bin/php

and on checking suexec.log it appears to be executing okay:

[2011-05-13 08:29:29]: uid: (9000/somehost.co.uk) gid: (9000/somehost.co.uk) cmd: php.fcgi

Any help gratefully appreciated.
-- 
Thanks, Phil

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org