forked from ISTI-ansible-roles/ansible-roles
nginx template: give the possibility to add proxy redirections without including the global proxy configurations.
This commit is contained in:
parent
874be418a0
commit
a40456ea1c
|
@ -27,7 +27,6 @@ server {
|
||||||
return 301 https://{{ item.server_name }}$request_uri;
|
return 301 https://{{ item.server_name }}$request_uri;
|
||||||
}
|
}
|
||||||
{% else %}
|
{% else %}
|
||||||
# This is the default for nginx on Ubuntu 14.04
|
|
||||||
root {{ item.root | default('/usr/share/nginx/html/') }};
|
root {{ item.root | default('/usr/share/nginx/html/') }};
|
||||||
index {{ item.index | default('index.html index.htm') }};
|
index {{ item.index | default('index.html index.htm') }};
|
||||||
error_page 500 502 503 504 {{ item.error_page | default('/50x.html') }};
|
error_page 500 502 503 504 {{ item.error_page | default('/50x.html') }};
|
||||||
|
@ -81,7 +80,10 @@ server {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.proxy_standard_setup is defined and item.proxy_standard_setup %}
|
{% if item.proxy_standard_setup is defined and item.proxy_standard_setup %}
|
||||||
# Proxy stuff
|
# Proxy stuff
|
||||||
|
{% if item.include_global_proxy_conf is defined and not item.include_global_proxy_conf %}
|
||||||
|
{% else %}
|
||||||
include /etc/nginx/snippets/nginx-proxy-params.conf;
|
include /etc/nginx/snippets/nginx-proxy-params.conf;
|
||||||
|
{% endif %}
|
||||||
{% if item.proxy_additional_options is defined %}
|
{% if item.proxy_additional_options is defined %}
|
||||||
{% for popt in item.proxy_additional_options %}
|
{% for popt in item.proxy_additional_options %}
|
||||||
{{ popt }};
|
{{ popt }};
|
||||||
|
@ -171,7 +173,10 @@ server {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.proxy_standard_setup is defined and item.proxy_standard_setup %}
|
{% if item.proxy_standard_setup is defined and item.proxy_standard_setup %}
|
||||||
# Proxy stuff
|
# Proxy stuff
|
||||||
|
{% if item.include_global_proxy_conf is defined and not item.include_global_proxy_conf %}
|
||||||
|
{% else %}
|
||||||
include /etc/nginx/snippets/nginx-proxy-params.conf;
|
include /etc/nginx/snippets/nginx-proxy-params.conf;
|
||||||
|
{% endif %}
|
||||||
{% if item.proxy_additional_options is defined %}
|
{% if item.proxy_additional_options is defined %}
|
||||||
{% for popt in item.proxy_additional_options %}
|
{% for popt in item.proxy_additional_options %}
|
||||||
{{ popt }}
|
{{ popt }}
|
||||||
|
|
Loading…
Reference in New Issue