move maps to http context in nginx.conf
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2020-05-22 21:30:03 +02:00
parent 51f883fd96
commit 02c8e0a745
3 changed files with 17 additions and 17 deletions

View File

@ -88,6 +88,16 @@ nginx_xxxsp_enabled: True
nginx_xxxsp_parameters:
- mode=block
nginx_maps: []
# @var nginx_maps:example: >
# nginx_maps:
# - input: $input
# output: $output
# parameters:
# - "default 0"
# - "/old/path /new_path"
# @end
nginx_vhosts_dir: /var/www/vhosts
nginx_vhosts_default:
@ -117,12 +127,6 @@ 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

@ -33,6 +33,13 @@ http {
default upgrade;
'' close;
}
{% for map in nginx_maps %}
map {{ map.input }} {{ map.output }} {
{% for param in map.parameters %}
{{ param }};
{% endfor %}
}
{% endfor %}
sendfile on;
tcp_nopush on;

View File

@ -36,17 +36,6 @@ server {
{% endif %}
{% 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 }} {