2015-07-15 20:18:51 +07:00
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
2015-07-16 16:44:54 +07:00
|
|
|
|
2017-10-26 15:59:24 +07:00
|
|
|
{% for php in nginx_php %}
|
2019-12-29 22:29:18 +07:00
|
|
|
upstream {{ php.upstream_name }} {
|
2017-10-26 15:59:24 +07:00
|
|
|
{% for sock in php.sockets | default([]) %}
|
2018-03-17 00:53:53 +07:00
|
|
|
{% if sock.host is defined %}
|
2017-10-26 15:59:24 +07:00
|
|
|
server {{ sock.host }}:{{ sock.port }} weight={{ sock.weight | default('1') }} max_fails={{ sock.max_fails | default('5') }} fail_timeout={{ sock.fail_timeout | default('10s') }};
|
2015-07-16 21:26:40 +07:00
|
|
|
{% else %}
|
2019-12-29 22:29:18 +07:00
|
|
|
server unix:{{ sock.unix }} weight={{ sock.weight | default('1') }};
|
2015-07-16 21:26:40 +07:00
|
|
|
{% endif %}
|
2016-08-09 21:02:09 +07:00
|
|
|
{% endfor %}
|
|
|
|
}
|
2019-12-26 23:16:13 +07:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% if ansible_local.hanxhx_php.fpm_pool is defined%}
|
|
|
|
# -------------------------------------------------------
|
|
|
|
# Auto-detected PHP config for HanXHX.php ansible role
|
|
|
|
# -------------------------------------------------------
|
2016-08-09 21:02:09 +07:00
|
|
|
|
2019-12-26 23:16:13 +07:00
|
|
|
{% for php in ansible_local.hanxhx_php.fpm_pool %}
|
|
|
|
upstream {{ php.name }} {
|
|
|
|
server {% if php.listen.startswith('/') %}unix:{{ php.listen }}{% else %}{{ php.listen }}{% endif %};
|
|
|
|
}
|
2017-10-26 15:59:24 +07:00
|
|
|
{% endfor %}
|
2019-12-26 23:16:13 +07:00
|
|
|
{% endif %}
|
2016-08-09 21:02:09 +07:00
|
|
|
|
2015-07-15 20:18:51 +07:00
|
|
|
# vim:filetype=nginx
|