Subject: Re: [vserver] nginx fastcgi on vserver (contao)
From: Eugen Leitl <eugen@leitl.org>
Date: Tue, 16 Nov 2010 16:01:42 +0100


Talking to myself, again:

apparently, http://library.linode.com/web-servers/nginx/php-fastcgi/debian-5-lenny
(with the spawn-fcgi binary from the stock debian lenny
lighttpd package) does work with 127.0.0.1 without
exposing ports to the outside.

How is this implemented, if real localhost is not available
within vserver guests? 

On Tue, Nov 16, 2010 at 03:06:59PM +0100, Eugen Leitl wrote:
> 
> Related question: running a fastcgi php gateway on a public,
> unfirewalled IP of the guest is a 100% certain recipe for the
> guest to get 0wn3d, right?
> 
> On Tue, Nov 16, 2010 at 02:30:00PM +0100, Eugen Leitl wrote:
> > 
> > Hi, 
> > 
> > this isn't a strictly a vserver-specific question, but it probably
> > has bitten several people.
> > 
> > Anyone using nginx + fastcgi successfully in a Linux vserver debian
> > lenny guest?
> > 
> > I'm getting 502 Bad Gateway, presumably due to
> > the following passage in the nginx config:
> > 
> >  location ~ .php$ {
> >   fastcgi_pass   127.0.0.1:9000;
> >   fastcgi_index  index.php;
> >   fastcgi_param  SCRIPT_FILENAME  /var/www/www.some-domain.com/htdocs$fastcgi_script_name;
> >   include        fastcgi_params;
> >  }
> > 
> > I've tried using the actual static IP of the vserver
> > guest there, but that didn't change the behaviour.
> > 
> > I'm following the instructions from
> > 
> > http://www.linux-web-development.de/2010/04/21/howto-typolight-mit-nginx-und-mysql
> > 
> > which strangely enough don't mention installing
> > spawn-fcgi from lighttpd.  When I invoke the fastcgi
> > PHP gateway manually as
> > 
> > php -b some.ip.here:9000
> > 
> > it works, however. Should I just bite the bullet, and try doing
> > it the lighttpd way, or the dedicated daemon way as
> > below?
> > 
> > http://tomasz.sterna.tv/2009/04/php-fastcgi-with-nginx-on-ubuntu/
> > 
> > -- 
> > Eugen* Leitl <a href="leitlhttp://leitl.org">leitl</a> http://leitl.org
> > ______________________________________________________________
> > ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org
> > 8B29F6BE: 099D 78BA 2FD3 B014 B08A  7779 75B0 2443 8B29 F6BE
> -- 
> Eugen* Leitl <a href="leitlhttp://leitl.org">leitl</a> http://leitl.org
> ______________________________________________________________
> ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org
> 8B29F6BE: 099D 78BA 2FD3 B014 B08A  7779 75B0 2443 8B29 F6BE
-- 
Eugen* Leitl <a href="leitlhttp://leitl.org">leitl</a> http://leitl.org
______________________________________________________________
ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org
8B29F6BE: 099D 78BA 2FD3 B014 B08A  7779 75B0 2443 8B29 F6BE