File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,10 @@ nginx_http_template:
168
168
html_file_name : index.html
169
169
http_demo_conf : false
170
170
load_balancer :
171
- proxy_pass : backend
171
+ locations :
172
+ backend :
173
+ location : /
174
+ proxy_pass : backend
172
175
health_check_plus : false
173
176
upstreams :
174
177
upstream1 :
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ server {
24
24
{% endif %}
25
25
server_name {{ item.value.server_name }};
26
26
{% if item .value .load_balancer is defined %}
27
- location / {
28
- proxy_pass http://{{ item.value.load_balancer.proxy_pass }};
27
+ {% for location in item .value .load_balancer .locations %}
28
+ location {{ item.value.load_balancer.locations[location] .location }} {
29
+ proxy_pass http://{{ item.value.load_balancer.locations[location] .proxy_pass }};
29
30
{% if item .value .load_balancer .health_check_plus %}
30
31
health_check;
31
32
{% endif %}
@@ -34,6 +35,8 @@ server {
34
35
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
35
36
proxy_set_header X-Forwarded-Proto $scheme;
36
37
}
38
+
39
+ {% endfor %}
37
40
{% endif %}
38
41
{% if item .value .web_server is defined %}
39
42
location / {
You can’t perform that action at this time.
0 commit comments