diff --git a/templates/vhost/vhost_header.erb b/templates/vhost/vhost_header.erb index b25fd42..fb212fc 100644 --- a/templates/vhost/vhost_header.erb +++ b/templates/vhost/vhost_header.erb @@ -32,7 +32,7 @@ server { } <% end -%> <% if @index_files -%> - index <% @index_files.each do |i| %> <%= i %><% end %>; + index <% Array(index_files).each do |i| %> <%= i %><% end %>; <% end -%> access_log <%= @access_log_real %>; diff --git a/templates/vhost/vhost_location_directory.erb b/templates/vhost/vhost_location_directory.erb index ce30782..785e16d 100644 --- a/templates/vhost/vhost_location_directory.erb +++ b/templates/vhost/vhost_location_directory.erb @@ -18,7 +18,7 @@ autoindex on; <% end -%> <% if @index_files -%> - index <% @index_files.each do |i| %> <%= i %><% end %>; + index <% Array(index_files).each do |i| %> <%= i %><% end %>; <% end -%> <% if defined? @auth_basic -%> auth_basic "<%= @auth_basic %>"; diff --git a/templates/vhost/vhost_ssl_header.erb b/templates/vhost/vhost_ssl_header.erb index b1c68c2..3da8711 100644 --- a/templates/vhost/vhost_ssl_header.erb +++ b/templates/vhost/vhost_ssl_header.erb @@ -21,7 +21,7 @@ server { auth_basic_user_file "<%= @auth_basic_user_file %>"; <% end -%> <% if @index_files -%> - index <% @index_files.each do |i| %> <%= i %><% end %>; + index <% Array(index_files).each do |i| %> <%= i %><% end %>; <% end -%> access_log <%= @ssl_access_log %>;