File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -344,13 +344,17 @@ nginx_http_template:
344
344
html_file_location : /usr/share/nginx/html
345
345
html_file_name : index.html
346
346
autoindex : false
347
+ auth_basic : null
348
+ auth_basic_file : null
347
349
http_demo_conf : false
348
350
reverse_proxy :
349
351
locations :
350
352
backend :
351
353
location : /
352
354
proxy_pass : http://backend
353
355
websocket : false
356
+ auth_basic : null
357
+ auth_basic_file : null
354
358
health_check_plus : false
355
359
upstreams :
356
360
upstream1 :
Original file line number Diff line number Diff line change @@ -175,13 +175,17 @@ nginx_http_template:
175
175
html_file_location : /usr/share/nginx/html
176
176
html_file_name : index.html
177
177
autoindex : false
178
+ auth_basic : null
179
+ auth_basic_file : null
178
180
http_demo_conf : false
179
181
reverse_proxy :
180
182
locations :
181
183
backend :
182
184
location : /
183
185
proxy_pass : http://backend
184
186
websocket : false
187
+ auth_basic : null
188
+ auth_basic_file : null
185
189
health_check_plus : false
186
190
upstreams :
187
191
upstream1 :
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ server {
33
33
{% if item .value .reverse_proxy is defined %}
34
34
{% for location in item .value .reverse_proxy .locations %}
35
35
location {{ item.value.reverse_proxy.locations[location] .location }} {
36
+ {% if item .value .reverse_proxy .locations [location ].auth_basic is defined and item .value .reverse_proxy .locations [location ].auth_basic %}
37
+ auth_basic "{{ item.value.reverse_proxy.locations[location] .auth_basic }}";
38
+ {% endif %}
39
+ {% if item .value .reverse_proxy .locations [location ].auth_basic_file is defined and item .value .reverse_proxy .locations [location ].auth_basic_file %}
40
+ auth_basic_user_file {{ item.value.reverse_proxy.locations[location] .auth_basic_file }};
41
+ {% endif %}
36
42
proxy_pass {{ item.value.reverse_proxy.locations[location] .proxy_pass }};
37
43
{% if item .value .reverse_proxy .health_check_plus is defined and item .value .reverse_proxy .health_check_plus %}
38
44
health_check;
@@ -56,6 +62,12 @@ server {
56
62
index {{ item.value.web_server.locations[location] .html_file_name }};
57
63
{% if item .value .web_server .locations [location ].autoindex %}
58
64
autoindex on;
65
+ {% endif %}
66
+ {% if item .value .web_server .locations [location ].auth_basic is defined and item .value .web_server .locations [location ].auth_basic %}
67
+ auth_basic "{{ item.value.web_server.locations[location] .auth_basic }}";
68
+ {% endif %}
69
+ {% if item .value .web_server .locations [location ].auth_basic_file is defined and item .value .web_server .locations [location ].auth_basic_file %}
70
+ auth_basic_user_file {{ item.value.web_server.locations[location] .auth_basic_file }};
59
71
{% endif %}
60
72
}
61
73
{% endfor %}
You can’t perform that action at this time.
0 commit comments