note 126022 added to install.fpm.configuration
| From: | rob at librobert dot net | Date: | Sun, 18 Apr 2021 11:53:58 +0000 |
| Subject: | note 126022 added to install.fpm.configuration | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216302@lists.php.net to get a copy of this message | ||
The 'index' directive that is used in php-fpm.conf is not documented here. However, this
directive can also be used in the pool configurations. In the included file, the $pool variable is
substituted correctly.
This means that, if you have multiple pools with similar configurations, you can create a file
'default-values.inc' like so:
-----
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = X
pm.min_spare_servers = X
pm.max_spare_servers = X
access.log = /var/log/php-fpm/$pool.access
access.format = "%R %u [%t] \"%m %r\" %s %d %l"
slowlog = /var/log/php-fpm/$pool.slow
php_flag[short_open_tag] = off
-----
And then include that file in each pool configuration like so:
-----
[vhost1.example.com]
user = www-vhost1
group = www-vhost1
listen = 127.0.0.1:9001
include = /usr/local/etc/php-fpm.d/default-values.inc
-----
This makes things a bit more transparent, and it could potentially save some time if you decide to
change settings.
Make sure the name of the included file does not end in '.conf', because all files with
that extension are loaded from php-fpm.conf.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 37.167.70.134)
----
Manual Page -- https://php.net/manual/en/install.fpm.configuration.php
Edit -- https://main.php.net/note/edit/126022
Del: integrated -- https://main.php.net/note/delete/126022/integrated
Del: useless -- https://main.php.net/note/delete/126022/useless
Del: bad code -- https://main.php.net/note/delete/126022/bad+code
Del: spam -- https://main.php.net/note/delete/126022/spam
Del: non-english -- https://main.php.net/note/delete/126022/non-english
Del: in docs -- https://main.php.net/note/delete/126022/in+docs
Del: other reasons-- https://main.php.net/note/delete/126022
Reject -- https://main.php.net/note/reject/126022
Search -- https://main.php.net/manage/user-notes.php