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

31 lines
937 B
Django/Jinja

#
# {{ ansible_managed }}
#
{% if nginx_php56 %}
upstream {{ nginx_upstream_php56 }} {
{% for item in nginx_php56_sockets %}
{% if item.unix_socket is defined %}
server unix:{{ item.unix_socket }} weight={{ item.weight | default('1') }};
{% else %}
server {{ item.host }}:{{ item.port }} weight={{ item.weight | default('1') }} max_fails={{ item.max_fails | default('5') }} fail_timeout={{ item.fail_timeout | default('10s') }};
{% endif %}
{% endfor %}
}
{% endif %}
{% if nginx_php70 %}
upstream {{ nginx_upstream_php70 }} {
{% for item in nginx_php70_sockets %}
{% if item.unix_socket is defined %}
server unix:{{ item.unix_socket }} weight={{ item.weight | default('1') }};
{% else %}
server {{ item.host }}:{{ item.port }} weight={{ item.weight | default('1') }} max_fails={{ item.max_fails | default('5') }} fail_timeout={{ item.fail_timeout | default('10s') }};
{% endif %}
{% endfor %}
}
{% endif %}
# vim:filetype=nginx