ansible-nginx/templates/etc/nginx/conf.d/php.conf.j2

21 lines
689 B
Plaintext
Raw Normal View History

2015-07-15 20:18:51 +07:00
#
# {{ ansible_managed }}
#
2015-07-16 16:44:54 +07:00
{% for php in nginx_php %}
upstream {{ php.upstream_name | default((php.version | php_default_upstream_name)) }} {
{% for sock in php.sockets | default([]) %}
2018-03-17 00:53:53 +07:00
{% if sock.host is defined %}
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 %}
server unix:{{ sock.unix | default((php.version | php_default_upstream_socket)) }} weight={{ sock.weight | default('1') }};
2015-07-16 21:26:40 +07:00
{% endif %}
{% else %}
server unix:{{ php.version | php_default_upstream_socket }} weight=1;
{% endfor %}
}
{% endfor %}
2015-07-15 20:18:51 +07:00
# vim:filetype=nginx