Fixed the ability to disable the index_files
This commit is contained in:
parent
658b25fe30
commit
611c80f75e
4 changed files with 4 additions and 4 deletions
|
@ -237,7 +237,7 @@ define nginx::resource::vhost (
|
|||
fastcgi_script => $fastcgi_script,
|
||||
try_files => $try_files,
|
||||
www_root => $www_root,
|
||||
index_files => undef,
|
||||
index_files => [],
|
||||
location_custom_cfg => $location_custom_cfg,
|
||||
notify => Class['nginx::service'],
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ server {
|
|||
return 301 https://$host$request_uri;
|
||||
}
|
||||
<% end -%>
|
||||
<% if @index_files -%>
|
||||
<% if @index_files.count > 0 -%>
|
||||
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
|
||||
<% end -%>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<% if @autoindex == 'on' -%>
|
||||
autoindex on;
|
||||
<% end -%>
|
||||
<% if @index_files -%>
|
||||
<% if @index_files.count > 0 -%>
|
||||
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
|
||||
<% end -%>
|
||||
<% if defined? @auth_basic -%>
|
||||
|
|
|
@ -20,7 +20,7 @@ server {
|
|||
<% if defined? @auth_basic_user_file -%>
|
||||
auth_basic_user_file "<%= @auth_basic_user_file %>";
|
||||
<% end -%>
|
||||
<% if @index_files -%>
|
||||
<% if @index_files.count > 0 -%>
|
||||
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
|
||||
<% end -%>
|
||||
|
||||
|
|
Loading…
Reference in a new issue