PHP, Apache, Mongrel cluster
Erik VanBruken
iamkenzo at gmail.com
Thu Jan 24 17:00:53 MSK 2008
Hello,
You are saying that it is better to follow this documentation page:
http://wiki.codemongers.com/NginxFcgiExample
Than this one: http://blog.kovyrin.net/2006/05/30/nginx-php-fastcgi-howto/
On Jan 24, 2008 2:42 PM, Allen Parker <parker at isohunt.com> wrote:
> Cliff Wells wrote:
> > On Thu, 2008-01-17 at 16:48 +0100, Stefanita rares Dumitrescu wrote:
> >
> >> one note though, when using php-fastcgi, i would suggest using
> >> lighthttpd's spawn-fcgi program. i had issues with the init scripts
> >> found for php-fascgi.
> >
> > I concur. The spawn-fcgi program from Lighttpd is how I run PHP as
> > well.
> >
> > Cliff
> >
> >
>
> If you combine spawn-fcgi (from lighttpd) with daemontools, you get an
> indestructible php-fcgi, simply killall -9 php-cgi (or your distro's
> equivalent) and php will automatically be restarted ;-)
>
> The benefit here is that if php craps out, daemontools will notice and
> restart it.
>
> sample 'run' file:
> #!/bin/sh
>
> CHILDREN="25"
>
> FCGI_HOST=127.0.0.1
> FCGI_USER=php
> FCGI_GROUP=php
> FCGI_BIN=/usr/bin/php-cgi
> FCGI_PORT=1705
>
> test -x $FCGI_BIN || { echo "$FCGI_BIN not installed";
> if [ "$1" = "stop" ]; then exit 0;
> else exit 5; fi; }
>
>
>
>
> export SHELL="/bin/bash"
> exec /usr/bin/spawn-fcgi -n \
> -f $FCGI_BIN \
> -a $FCGI_HOST \
> -p $FCGI_PORT \
> -u $FCGI_USER \
> -g $FCGI_GROUP \
> -C $CHILDREN
>
>
More information about the nginx
mailing list