location <%= @location %> { <% if @location_allow -%><% @location_allow.each do |allow_rule| -%> allow <%= allow_rule %>; <% end -%><% end -%> <% if @location_deny -%><% @location_deny.each do |deny_rule| -%> deny <%= deny_rule %>; <% end -%><% end -%> <% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |value| -%> <%= value %> <% end -%><% end -%> <% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> <%= key %> <%= value %>; <% end -%><% end -%> <% if defined? @www_root -%> root <%= @www_root %>; <% end -%> <% if @try_files -%> try_files<% @try_files.each do |try| -%> <%= try %><% end -%>; <% end -%> <% if @autoindex == 'on' -%> autoindex on; <% end -%> <% if @index_files.count > 0 -%> index <% Array(@index_files).each do |i| %> <%= i %><% end %>; <% end -%> <% @rewrite_rules.each do |rewrite_rule| -%> rewrite <%= rewrite_rule %>; <% end -%> <% if defined? @auth_basic -%> auth_basic "<%= @auth_basic %>"; <% end -%> <% if defined? @auth_basic_user_file -%> auth_basic_user_file <%= @auth_basic_user_file %>; <% end -%> <% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> <%= key %> <%= value %>; <% end -%><% end -%> <% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |value| -%> <%= value %> <% end -%><% end -%> }