diff --git a/nginx/templates/nginx-virthost.j2 b/nginx/templates/nginx-virthost.j2 index 709a414..5d8ca56 100644 --- a/nginx/templates/nginx-virthost.j2 +++ b/nginx/templates/nginx-virthost.j2 @@ -27,7 +27,6 @@ server { return 301 https://{{ item.server_name }}$request_uri; } {% else %} - # This is the default for nginx on Ubuntu 14.04 root {{ item.root | default('/usr/share/nginx/html/') }}; index {{ item.index | default('index.html index.htm') }}; error_page 500 502 503 504 {{ item.error_page | default('/50x.html') }}; @@ -81,7 +80,10 @@ server { {% endif %} {% if item.proxy_standard_setup is defined and item.proxy_standard_setup %} # 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; + {% endif %} {% if item.proxy_additional_options is defined %} {% for popt in item.proxy_additional_options %} {{ popt }}; @@ -171,7 +173,10 @@ server { {% endif %} {% if item.proxy_standard_setup is defined and item.proxy_standard_setup %} # 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; + {% endif %} {% if item.proxy_additional_options is defined %} {% for popt in item.proxy_additional_options %} {{ popt }}