Fixed the ability to disable the index_files

This commit is contained in:
Lebedev Vadim 2013-12-25 04:13:22 +04:00
parent 658b25fe30
commit 611c80f75e
4 changed files with 4 additions and 4 deletions

View file

@ -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'],
}

View file

@ -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 -%>

View file

@ -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 -%>

View file

@ -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 -%>