D
D
Dim Boy2020-01-12 23:07:48
PHP
Dim Boy, 2020-01-12 23:07:48

Should I do PHP FPM one for several sites?

I have a dozen sites on the server in docker, each on the server has its own nginx + php bundle,
so I thought, isn’t it better to make several php-fpm containers with several versions, and cling site processing to them? Instead of spawning for each site using php-fpm

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-01-12
@firedragon

nginx redirects to a socket or port, what's the problem with setting them the same?
Or are you wondering if it's possible to do this?
Yes, in general.

P
Pavel Romanov, 2020-01-13
@fibit

If on your server all ten sites work "under one user", then you can not bother and do 1 php-fpm for all sites, you will not lose points in terms of security.
If the sites work "under different users", then of course you should separate php-fpm for each site, while always specifying the user / group, example:

[*site_url*]
listen = /var/run/*site_url*.sock
listen.allowed_clients = 127.0.0.1

user = user
group = group

listen.owner = user
listen.group = nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question