2015-07-15 20:18:51 +07:00
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
2015-07-16 16:44:54 +07:00
|
|
|
|
2016-08-09 21:02:09 +07:00
|
|
|
{% if nginx_php5 %}
|
|
|
|
upstream {{ nginx_upstream_php5 }} {
|
|
|
|
{% for item in nginx_php5_sockets %}
|
2015-07-16 21:26:40 +07:00
|
|
|
{% if item.unix_socket is defined %}
|
2015-07-16 16:44:54 +07:00
|
|
|
server unix:{{ item.unix_socket }} weight={{ item.weight | default('1') }};
|
2015-07-16 21:26:40 +07:00
|
|
|
{% else %}
|
2015-07-16 16:44:54 +07:00
|
|
|
server {{ item.host }}:{{ item.port }} weight={{ item.weight | default('1') }} max_fails={{ item.max_fails | default('5') }} fail_timeout={{ item.fail_timeout | default('10s') }};
|
2015-07-16 21:26:40 +07:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2015-07-15 21:26:27 +07:00
|
|
|
}
|
2015-07-15 20:18:51 +07:00
|
|
|
|
2016-08-09 21:02:09 +07:00
|
|
|
{% endif %}
|
|
|
|
{% if nginx_php7 %}
|
|
|
|
upstream {{ nginx_upstream_php7 }} {
|
|
|
|
{% for item in nginx_php7_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 %}
|
|
|
|
|
2015-07-15 20:18:51 +07:00
|
|
|
# vim:filetype=nginx
|