49 lines
2 KiB
Text
49 lines
2 KiB
Text
|
; {{ ansible_managed }}
|
||
|
{% for pool in phpfpm_pools %}
|
||
|
|
||
|
[{{ pool.name }}]
|
||
|
|
||
|
user = {{ pool.user }}
|
||
|
group = {{ pool.group|default(phpfpm_group) }}
|
||
|
|
||
|
listen = /var/run/php{{ phpfpm_version }}-fpm-{{ pool.name }}.sock
|
||
|
listen.owner = {{ pool.user }}
|
||
|
listen.group = {{ pool.group|default(phpfpm_group) }}
|
||
|
|
||
|
pm = {{ pool.pm|default(phpfpm_pm) }}
|
||
|
pm.max_children = {{ pool.pm_max_children|default(phpfpm_pm_max_children) }}
|
||
|
{% if pool.pm is defined and pool.pm in ['ondemand', 'dynamic'] or phpfpm_pm in ['static', 'dynamic'] %}
|
||
|
pm.start_servers = {{ pool.pm_start_servers|default(phpfpm_pm_start_servers) }}
|
||
|
{% endif %}
|
||
|
{% if pool.pm is defined and pool.pm == 'dynamic' or phpfpm_pm == 'dynamic' %}
|
||
|
pm.min_spare_servers = {{ pool.pm_min_spare_servers|default(phpfpm_pm_min_spare_servers) }}
|
||
|
pm.max_spare_servers = {{ pool.pm_max_spare_servers|default(phpfpm_pm_max_spare_servers) }}
|
||
|
{% endif %}
|
||
|
pm.max_requests = {{ pool.pm_max_requests|default(phpfpm_pm_max_requests) }}
|
||
|
pm.process_idle_timeout = {{ pool.pm_process_idle_timeout|default(phpfpm_pm_process_idle_timeout) }}s
|
||
|
pm.status_path = {{ pool.pm_status_path|default(phpfpm_pm_status_path) }}
|
||
|
|
||
|
ping.path = {{ pool.ping_path|default(phpfpm_ping_path) }}
|
||
|
ping.response = {{ pool.ping_response|default(phpfpm_ping_response) }}
|
||
|
|
||
|
access.log = {{ phpfpm_dir_log }}/{{ pool.name }}.access.log
|
||
|
access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||
|
|
||
|
slowlog = {{ phpfpm_dir_log }}/{{ pool.name }}.slow.log
|
||
|
request_slowlog_timeout = {{ pool.request_slowlog_timeout|default(phpfpm_request_slowlog_timeout) }}
|
||
|
|
||
|
catch_workers_output = no
|
||
|
|
||
|
security.limit_extensions = {{ pool.security_limit_extensions|default(phpfpm_security_limit_extensions) }}
|
||
|
|
||
|
clear_env = yes
|
||
|
env[HOSTNAME] = $HOSTNAME
|
||
|
{% if pool.php_config is defined %}
|
||
|
{% for type, options in pool.php_config.iteritems() %}
|
||
|
{% for option, value in options.iteritems() %}
|
||
|
php_{{ type }}[{{ option }}] = {{ value }}
|
||
|
{% endfor %}
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|