diff --git a/defaults/main.yml b/defaults/main.yml index 71797ec..89d48a3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -138,6 +138,7 @@ nginx_vhosts_default: # proxy_read_timeout: 3600s # proxy_send_timeout: 3600s # proxy_headers: [] +# proxy_intercept_errors: "off" # custom_options: # - 'deny: all' # error_page: /usr/share/nginx/html diff --git a/templates/etc/nginx/sites-available/vhost.j2 b/templates/etc/nginx/sites-available/vhost.j2 index 2167b8f..202ee29 100644 --- a/templates/etc/nginx/sites-available/vhost.j2 +++ b/templates/etc/nginx/sites-available/vhost.j2 @@ -63,6 +63,9 @@ server { {% if location.proxy_send_timeout is defined and location.proxy_send_timeout %} proxy_send_timeout {{ location.proxy_send_timeout }}; {% endif %} + {% if location.proxy_intercept_errors is defined and location.proxy_intercept_errors %} + proxy_intercept_errors {{ location.proxy_intercept_errors }}; + {% endif %} {% if location.proxy_headers is defined and location.proxy_headers %} {% for pheader in location.proxy_headers %}