PHP init script to go with nginx?

Renaud Allard renaud at
Fri Jun 13 11:59:13 MSD 2008

Phillip B Oldham wrote:
> Hi all
> I'm running PHP5 & nginx on a number of servers now, and I'm really 
> happy with everything... except one item which is starting to bug me.
> Basically, on all the servers I run PHP5 by issuing the following 
> command from a shell script:
> sudo -u nginx sh -c 'PHP_FCGI_MAX_REQUESTS=50 PHP_FCGI_CHILDREN=4 
> /usr/local/bin/php-cgi -b 10005 &'
> Which works fine, other than it doen't start php on boot. Its getting 
> annoying because if the server reboots I have to manually start PHP.
> Has anyone got a happy php-fastcgi install which doesn't use spawn-fcgi?

php-fpm is probably the best way to start php as a cgi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3291 bytes
Desc: S/MIME Cryptographic Signature
URL: <>

More information about the nginx mailing list