add maps to vhost template
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-05-22 21:22:06 +02:00
parent 13d524fd9a
commit 51f883fd96
2 changed files with 16 additions and 0 deletions

View File

@ -117,6 +117,12 @@ nginx_vhosts_default:
# dhparam:
# client_max_body_size:
# send_timeout:
# maps:
# - input: $input
# output: $output
# parameters:
# - "default 0"
# - "/old/path /new_path"
# locations:
# - match: /
# root: /var/www/vhosts/default

View File

@ -37,7 +37,17 @@ server {
{% if server.send_timeout is defined and server.send_timeout %}
send_timeout {{ server.send_timeout }};
{% endif %}
{% if server.maps is defined and server.maps %}
{% for map in server.maps %}
map {{ map.input }} {{ map.output }} {
{% for param in map.parameters %}
{{ param }};
{% endfor %}
}
{% endfor %}
{% endif %}
{% for location in server.locations %}
location {{ location.match }} {
{% if location.root is defined and location.root %}