File tree Expand file tree Collapse file tree 5 files changed +17
-0
lines changed Expand file tree Collapse file tree 5 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,7 @@ nginx_main_template:
312
312
rate_limit : false
313
313
keyval : false
314
314
stream_enable : false
315
+ http_global_autoindex : false
315
316
316
317
# Enable creating dynamic templated NGINX HTTP configuration files.
317
318
# Defaults will not produce a valid configuration. Instead they are meant to showcase
@@ -327,6 +328,7 @@ nginx_http_template:
327
328
port : 8081
328
329
server_name : localhost
329
330
error_page : /usr/share/nginx/html
331
+ autoindex : false
330
332
ssl :
331
333
cert : ssl/default.crt
332
334
key : ssl/default.key
@@ -336,6 +338,7 @@ nginx_http_template:
336
338
location : /
337
339
html_file_location : /usr/share/nginx/html
338
340
html_file_name : index.html
341
+ autoindex : false
339
342
http_demo_conf : false
340
343
load_balancer :
341
344
locations :
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ nginx_main_template:
145
145
rate_limit : false
146
146
keyval : false
147
147
stream_enable : false
148
+ http_global_autoindex : false
148
149
149
150
# Enable creating dynamic templated NGINX HTTP configuration files.
150
151
# Defaults will not produce a valid configuration. Instead they are meant to showcase
@@ -160,6 +161,7 @@ nginx_http_template:
160
161
port : 8081
161
162
server_name : localhost
162
163
error_page : /usr/share/nginx/html
164
+ autoindex : false
163
165
ssl :
164
166
cert : ssl/default.crt
165
167
key : ssl/default.key
@@ -169,6 +171,7 @@ nginx_http_template:
169
171
location : /
170
172
html_file_location : /usr/share/nginx/html
171
173
html_file_name : index.html
174
+ autoindex : false
172
175
http_demo_conf : false
173
176
load_balancer :
174
177
locations :
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ server {
23
23
listen {{ item.value.port }};
24
24
{% endif %}
25
25
server_name {{ item.value.server_name }};
26
+ {% if item .value .autoindex %}
27
+ autoindex on;
28
+ {% endif %}
26
29
{% if item .value .load_balancer is defined %}
27
30
{% for location in item .value .load_balancer .locations %}
28
31
location {{ item.value.load_balancer.locations[location] .location }} {
@@ -43,6 +46,9 @@ server {
43
46
location {{ item.value.web_server.locations[location] .location }} {
44
47
root {{ item.value.web_server.locations[location] .html_file_location }};
45
48
index {{ item.value.web_server.locations[location] .html_file_name }};
49
+ {% if item .value .web_server .locations [location ].autoindex %}
50
+ autoindex on;
51
+ {% endif %}
46
52
}
47
53
{% endfor %}
48
54
{% if item .value .web_server .http_demo_conf %}
Original file line number Diff line number Diff line change 35
35
{% if nginx_main_template .http_settings .keyval %}
36
36
keyval_zone zone={{nginx_main_template.http_settings.keyval.zone}}:32k state=one.keyval;
37
37
keyval $arg_text $text zone=one;
38
+ {% endif %}
39
+ {% if nginx_main_template .http_global_autoindex %}
40
+ autoindex on;
38
41
{% endif %}
39
42
include /etc/nginx/conf.d/*.conf;
40
43
}
Original file line number Diff line number Diff line change 14
14
port : 80
15
15
server_name : localhost
16
16
error_page : /usr/share/nginx/html
17
+ autoindex : false
17
18
web_server :
18
19
locations :
19
20
default :
20
21
location : /
21
22
html_file_location : /usr/share/nginx/html
22
23
html_file_name : index.html
24
+ autoindex : false
23
25
http_demo_conf : false
You can’t perform that action at this time.
0 commit comments