move maps to http context in nginx.conf
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
51f883fd96
commit
02c8e0a745
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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 }} {
|
||||
|
Loading…
Reference in New Issue
Block a user