Welcome! Log In Create A New Profile

Advanced

Re: Nginx + php + fpm plug'n'play configuration

Francis Daly
April 05, 2011 07:52AM
On Tue, Apr 05, 2011 at 11:59:43AM +0200, Daniele Pignedoli wrote:

Hi there,

> Hi francis, many thanks for your suggestion, with that i've been able to
> setup a 'almost-work' enrivonment!

Good stuff.

> I have a file i my /etc/nginx/sites-available/ (softlinket do sites-enabled)
> that looks as follow:

OK, so you've gone for "one nginx which can read all files".

Your config looks to me like it should work ok.

> Then, in my /etc/php5/fpm/fpm.d/ i just create a new file for each
> subdomain, for example:

And this is "one fpm that runs many instances as different users", which,
as you have spotted, needs a restart for a changed user.

> This isnt the "plug'n'play" behavior i was looking for, becose in order to
> activate new domains i have to run `/etc/init.d/php-fpm reload`;

I think I had suggested just running one fcgi server per user, which would
avoid the "restart" thing. That would probably be the equivalent to your

> php5-cgi -b /var/run/php5-fpm-test_bar.sock

Of course, that's all php or fpm stuff, rather than nginx stuff. So:

> Then, running a cron task that every night kill all the php5-cgi instances
> and then reload the fpm configuration.

....while I think that will probably work ok, you may find better
confirmation elsewhere.

Note that on the nginx side, you haven't got anything specific relating to

> > > So, for every requests to *.example.com, i need to:
> > > 1. check if user and folder exists

that. But your testing will show what response you get, and you can
decide whether that is adequate for you.

Good luck with it,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx + php + fpm plug'n'play configuration

Daniele Pignedoli April 01, 2011 10:16AM

Re: Nginx + php + fpm plug'n'play configuration

Francis Daly April 01, 2011 11:34AM

Re: Nginx + php + fpm plug'n'play configuration

strae April 05, 2011 06:00AM

Re: Nginx + php + fpm plug'n'play configuration

Francis Daly April 05, 2011 07:52AM

Re: Nginx + php + fpm plug'n'play configuration

strae April 05, 2011 08:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready