ansible-nginx/templates/etc/nginx/sites-available/_proxy.j2

22 lines
512 B
Plaintext
Raw Normal View History

2015-10-08 23:21:40 +07:00
{% extends "_base.j2" %}
2016-01-22 15:36:52 +07:00
{% block root %}
{% if item.root is defined %}
root {{ item.root }};
{% endif %}
{% endblock %}
2016-01-22 15:36:52 +07:00
2015-10-08 23:21:40 +07:00
{% block template_try_files %}
2016-03-05 21:36:25 +07:00
include {{ nginx_etc_dir }}/proxy_params;
2015-10-08 23:21:40 +07:00
proxy_pass http://{{ item.upstream_name }};
{% if item.proxy_params is defined and item.proxy_params is iterable %}
{% for param in item.proxy_params %}
{{ param }}
{% endfor %}
{% endif %}
{% endblock %}
{# We flush the default local content (locations) #}
{% block template_local_content %}
{% endblock %}