use a list for nginx_error_location
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
08813acac8
commit
21bd776e75
@ -107,17 +107,17 @@ nginx_error_page: []
|
||||
# dest: /4xx.html
|
||||
# @end
|
||||
|
||||
nginx_error_location: []
|
||||
# @var nginx_error_location: description: >
|
||||
# Default error location. If set, the defined location will be automatically added once
|
||||
# to every server block to handle custom error sites.
|
||||
# @end
|
||||
# @var nginx_error_location:default: $ "_unset_"
|
||||
# @var nginx_error_location: example: >
|
||||
# nginx_error_location:
|
||||
# match: /
|
||||
# root: /var/www/vhosts/default
|
||||
# index: index.html
|
||||
# custom_options:
|
||||
# - match: /
|
||||
# root: /var/www/vhosts/default
|
||||
# index: index.html
|
||||
# custom_options:
|
||||
# @end
|
||||
|
||||
nginx_vhosts_dir: /var/www/vhosts
|
||||
|
@ -90,22 +90,22 @@ server {
|
||||
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if nginx_error_location is defined %}
|
||||
location {{ nginx_error_location.match }} {
|
||||
{% if nginx_error_location.root is defined and nginx_error_location.root %}
|
||||
root {{ nginx_error_location.root }};
|
||||
{% for error_location in nginx_error_location %}
|
||||
location {{ error_location.match }} {
|
||||
{% if error_location.root is defined and error_location.root %}
|
||||
root {{ error_location.root }};
|
||||
{% endif %}
|
||||
{% if nginx_error_location.index is defined and nginx_error_location.index %}
|
||||
index {{ nginx_error_location.index }};
|
||||
{% if error_location.index is defined and error_location.index %}
|
||||
index {{ error_location.index }};
|
||||
|
||||
{% 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 }};
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user