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 @@ -171,6 +171,7 @@ nginx_http_template:
171
171
root : /usr/share/nginx/html
172
172
https_redirect : false
173
173
autoindex : false
174
+ try_files : $uri $uri/index.html $uri.html =404
174
175
ssl :
175
176
cert : /etc/ssl/certs/default.crt
176
177
key : /etc/ssl/private/default.key
@@ -187,6 +188,7 @@ nginx_http_template:
187
188
autoindex : false
188
189
auth_basic : null
189
190
auth_basic_file : null
191
+ try_files : $uri $uri/index.html $uri.html =404
190
192
http_demo_conf : false
191
193
reverse_proxy :
192
194
proxy_cache_path :
@@ -238,6 +240,7 @@ nginx_http_template:
238
240
websocket : false
239
241
auth_basic : null
240
242
auth_basic_file : null
243
+ try_files : $uri $uri/index.html $uri.html =404
241
244
health_check_plus : false
242
245
proxy_cache :
243
246
proxy_cache_path :
Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ server {
77
77
{% if item .value .autoindex is defined and item .value .autoindex %}
78
78
autoindex on;
79
79
{% endif %}
80
+ {% if item .value .try_files is defined %}
81
+ try_files {{ item.value.try_files }};
82
+ {% endif %}
80
83
{% if item .value .reverse_proxy is defined %}
81
84
{% for location in item .value .reverse_proxy .locations %}
82
85
location {{ item.value.reverse_proxy.locations[location] .location }} {
@@ -93,6 +96,9 @@ server {
93
96
{% if item .value .reverse_proxy .locations [location ].proxy_read_timeout is defined and item .value .reverse_proxy .locations [location ].proxy_read_timeout %}
94
97
proxy_read_timeout {{ item.value.reverse_proxy.locations[location] .proxy_read_timeout }};
95
98
{% endif %}
99
+ {% if item .value .reverse_proxy .locations [location ].try_files is defined %}
100
+ try_files {{ item.value.reverse_proxy.locations[location] .try_files }};
101
+ {% endif %}
96
102
{% if item .value .reverse_proxy .locations [location ].proxy_ssl is defined %}
97
103
98
104
{% if item .value .reverse_proxy .locations [location ].proxy_ssl .cert is defined %}
@@ -177,6 +183,9 @@ server {
177
183
{% if item .value .web_server .locations [location ].autoindex %}
178
184
autoindex on;
179
185
{% endif %}
186
+ {% if item .value .web_server .locations [location ].try_files is defined %}
187
+ try_files {{ item.value.web_server.locations[location] .try_files }};
188
+ {% endif %}
180
189
{% if item .value .web_server .locations [location ].auth_basic is defined and item .value .web_server .locations [location ].auth_basic %}
181
190
auth_basic "{{ item.value.web_server.locations[location] .auth_basic }}";
182
191
{% endif %}
Original file line number Diff line number Diff line change @@ -22,11 +22,19 @@ upstream {{ item.value.upstreams[upstream].name }} {
22
22
{% for stream in item .value .network_streams %}
23
23
server {
24
24
{% if item .value .network_streams [stream ].listen_address is defined and item .value .network_streams [stream ].listen_port is defined %}
25
+ {% if item .value .network_streams [stream ].listen_address == 'localhost' %}
26
+ {% if item .value .network_streams [stream ].udp_enable %}
27
+ listen {{ item.value.network_streams[stream] .listen_port }} udp;
28
+ {% else %}
29
+ listen {{ item.value.network_streams[stream] .listen_port }};
30
+ {% endif %}
31
+ {% else %}
25
32
{% if item .value .network_streams [stream ].udp_enable %}
26
33
listen {{ item.value.network_streams[stream] .listen_address }}:{{ item.value.network_streams[stream] .listen_port }} udp;
27
34
{% else %}
28
35
listen {{ item.value.network_streams[stream] .listen_address }}:{{ item.value.network_streams[stream] .listen_port }};
29
36
{% endif %}
37
+ {% endif %}
30
38
{% elif item .value .network_streams [stream ].listen_port is defined %}
31
39
{% if item .value .network_streams [stream ].udp_enable %}
32
40
listen {{ item.value.network_streams[stream] .listen_port }} udp;
You can’t perform that action at this time.
0 commit comments