Make some variables optional. (#156)
* make variable nginx_main_template.http_global_autoindex optional * make location variables autoindex, html_file_location and html_file_name optional
This commit is contained in:
parent
421882389d
commit
b1ee7e7ff2
@ -271,9 +271,13 @@ server {
|
||||
{% if item.value.web_server is defined %}
|
||||
{% for location in item.value.web_server.locations %}
|
||||
location {{ item.value.web_server.locations[location].location }} {
|
||||
{% if item.value.web_server.locations[location].html_file_location is defined %}
|
||||
root {{ item.value.web_server.locations[location].html_file_location }};
|
||||
{% endif %}
|
||||
{% if item.value.web_server.locations[location].html_file_name is defined %}
|
||||
index {{ item.value.web_server.locations[location].html_file_name }};
|
||||
{% if item.value.web_server.locations[location].autoindex %}
|
||||
{% endif %}
|
||||
{% if item.value.web_server.locations[location].autoindex | default(false) %}
|
||||
autoindex on;
|
||||
{% endif %}
|
||||
{% if item.value.web_server.locations[location].try_files is defined %}
|
||||
|
@ -38,7 +38,7 @@ http {
|
||||
keyval_zone zone={{nginx_main_template.http_settings.keyval.zone}}:32k state=one.keyval;
|
||||
keyval $arg_text $text zone=one;
|
||||
{% endif %}
|
||||
{% if nginx_main_template.http_global_autoindex %}
|
||||
{% if nginx_main_template.http_global_autoindex | default(false) %}
|
||||
autoindex on;
|
||||
{% endif %}
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
Loading…
Reference in New Issue
Block a user