Welcome! Log In Create A New Profile

Advanced

php-fpm pools - how to ?

Posted by ktm 
ktm
php-fpm pools - how to ?
June 25, 2009 08:30AM
Hi, I'm new to php-fpm and generally pretty new to web servers. I configured nginx + php-5.2.10 + php-fpm patch, everything is working fine but now i have a problem, i didn't find any good documentation.
I want to run every website on my server under a different user so if one site is compromised it won't affect the others. I understand that is easy to do that with php-fpm but I don't know exactly how.
Can somehow tell me how to do it ? Maybe a short guide :) ? I'm sure it will be useful for others too

Thank you.
Meto
RE: php-fpm pools - how to ?
June 25, 2009 08:51AM
There is a user and group settings In your /etc/php5/fpm.conf.

You have to clone whole <section name="pool"> ... </section> in <workers> and change user and group in one of them and the port since it cac't listen to the same one. That's all. Maybe limit php child since one user may need less than others.

---
Pozdrawiam,

Maciek `meto` Wójcikowski
meto@xgame.pl
http://xgame.pl


-----Original Message-----
From: highload-php-en@googlegroups.com [mailto:highload-php-en@googlegroups.com] On Behalf Of ktm
Sent: Thursday, June 25, 2009 2:31 PM
To: highload-php-en@googlegroups.com
Subject: php-fpm pools - how to ?


Hi, I'm new to php-fpm and generally pretty new to web servers. I configured nginx + php-5.2.10 + php-fpm patch, everything is working fine but now i have a problem, i didn't find any good documentation.
I want to run every website on my server under a different user so if one site is compromised it won't affect the others. I understand that is easy to do that with php-fpm but I don't know exactly how.
Can somehow tell me how to do it ? Maybe a short guide :) ? I'm sure it will be useful for others too

Thank you.

Posted at Nginx Forum: http://forum.nginx.org/read.php?3,3364,3364#msg-3364
ktm
Re: RE: php-fpm pools - how to ?
June 27, 2009 04:24AM
Stupid question :), how do I know which user/group is serving which site and how can i precisely "assign" user/group to a certain site. For example I have example.com and dev.example.com. I want both to be run under different user names, for example for example.com ---ww-data and for dev.example.com - www-user
Re: RE: php-fpm pools - how to ?
June 27, 2009 04:30AM
setup a different pool for each one, give them a different tcp or unix
socket location.
then in your webserver, you point to the appropriate socket or tcp address.


On Sat, Jun 27, 2009 at 1:24 AM, ktm wrote:

>
> Stupid question :), how do I know which user/group is serving which site
> and how can i precisely "assign" user/group to a certain site. For example I
> have example.com and dev.example.com. I want both to be run under
> different user names, for example for example.com ---ww-data and for
> dev.example.com - www-user
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,3364,3466#msg-3466
>
>
ktm
Re: RE: php-fpm pools - how to ?
June 27, 2009 05:21AM
I got it, thank you. It works well, easy and efficient solution, php-fpm rocks :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
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