Is it possible to template pool configs in PHP-FPM similar to mod_macro in Apache?

25 views
Skip to first unread message

John

unread,
Dec 4, 2018, 5:06:56 AM12/4/18
to highload-php-en
Is it possible to set up a single file for pools in PHP-FPM and not have to enter all the config settings for each pool if they are identical, except for two fields?

In order to in a streamlined manner, mass produce different pools?

For example something like have a single file holding pools with a template at top like below and you only have to add one line with the host and user in it to add new pool  ....

[ start a new host]
[$host]
listen = /var/run/php-fpm/php-fpm_$host.sock
listen.allowed_clients = 127.0.0.1
user = $user
group = $user
pm = condemn
pm.max_children = 10
pm.process_idle_timeout = 10s
pm.max_requests = 200

# First pool
Use some1host, some1user;
#
# Second pool
Use some2host, some2user;
# etc.


Or some other approach that folks use to mass produce pools?

Thanks


Reply all
Reply to author
Forward
0 new messages