diff --git a/templates/conf.d/nginx.conf.erb b/templates/conf.d/nginx.conf.erb index 1230d0097..4c6f320ff 100644 --- a/templates/conf.d/nginx.conf.erb +++ b/templates/conf.d/nginx.conf.erb @@ -45,16 +45,16 @@ events { <%- if @events_use -%> use <%= @events_use %>; <%- end -%> - <% if @debug_connection && Array(@debug_connection).size > 0 -%> - <%- Array(@debug_connection).each do |address| -%> + <% if @debug_connection -%> + <%- @debug_connection.each do |address| -%> debug_connection <%= address %>; <%- end -%> <% end -%> } http { -<% if @http_raw_prepend -%> - <%- @http_raw_prepend.each do |line| -%> +<% if @http_raw_prepend && Array(@http_raw_prepend).size > 0 -%> + <%- Array(@http_raw_prepend).each do |line| -%> <%= line %> <%- end -%> <% end -%>