use a list for nginx_error_location
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-05-25 11:22:18 +02:00
parent 08813acac8
commit 21bd776e75
2 changed files with 14 additions and 14 deletions

View File

@ -107,14 +107,14 @@ nginx_error_page: []
# dest: /4xx.html # dest: /4xx.html
# @end # @end
nginx_error_location: []
# @var nginx_error_location: description: > # @var nginx_error_location: description: >
# Default error location. If set, the defined location will be automatically added once # Default error location. If set, the defined location will be automatically added once
# to every server block to handle custom error sites. # to every server block to handle custom error sites.
# @end # @end
# @var nginx_error_location:default: $ "_unset_"
# @var nginx_error_location: example: > # @var nginx_error_location: example: >
# nginx_error_location: # nginx_error_location:
# match: / # - match: /
# root: /var/www/vhosts/default # root: /var/www/vhosts/default
# index: index.html # index: index.html
# custom_options: # custom_options:

View File

@ -90,22 +90,22 @@ server {
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if nginx_error_location is defined %} {% for error_location in nginx_error_location %}
location {{ nginx_error_location.match }} { location {{ error_location.match }} {
{% if nginx_error_location.root is defined and nginx_error_location.root %} {% if error_location.root is defined and error_location.root %}
root {{ nginx_error_location.root }}; root {{ error_location.root }};
{% endif %} {% endif %}
{% if nginx_error_location.index is defined and nginx_error_location.index %} {% if error_location.index is defined and error_location.index %}
index {{ nginx_error_location.index }}; index {{ error_location.index }};
{% endif %} {% endif %}
{% if nginx_error_location.custom_options is defined and nginx_error_location.custom_options %} {% if error_location.custom_options is defined and error_location.custom_options %}
{% for inline_option in nginx_error_location.custom_options %} {% for inline_option in error_location.custom_options %}
{{ inline_option }}; {{ inline_option }};
{% endfor %} {% endfor %}
{% endif %} {% endif %}
} }
{% endif %} {% endfor %}
} }
{% endfor %} {% endfor %}