Re: [vserver] nginx fastcgi on vserver (contao)

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Tue 16 Nov 2010 - 15:08:24 GMT
Message-ID: <20101116150824.GG26106@MAIL.13thfloor.at>

On Tue, Nov 16, 2010 at 04:01:42PM +0100, Eugen Leitl wrote:
>
> 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?

depending on the kernel and configuration the isolated
loppback addresses (lback (re)mapping) look and feel
like the real thing inside a Linux-VServer guest

so given that your kernel is recent enough, and lback
remapping is properly configured, 127.0.0.1 bindings
are not a problem inside a guest

HTH,
Herbert

> 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 leitl 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 leitl 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 leitl 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
Received on Tue Nov 16 15:14:50 2010

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 16 Nov 2010 - 15:14:50 GMT by hypermail 2.1.8