2013-07-17 20:42:57 +02:00
|
|
|
location <%= @location %> {
|
2014-05-14 23:34:28 +02:00
|
|
|
<% 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 -%>
|
2014-03-10 10:38:16 +01:00
|
|
|
<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%>
|
|
|
|
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
|
|
|
|
<% Array(subvalue).each do |asubvalue| -%>
|
2014-04-12 21:17:45 +02:00
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>
|
2014-03-10 10:38:16 +01:00
|
|
|
<% end -%>
|
|
|
|
<% end -%><% else -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<% Array(value).each do |asubvalue| -%>
|
2014-04-12 21:17:45 +02:00
|
|
|
<%= key %> <%= asubvalue %>
|
2014-03-10 10:38:16 +01:00
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2014-03-08 02:32:40 +01:00
|
|
|
<% end -%><% end -%>
|
2013-07-17 20:42:57 +02:00
|
|
|
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
|
2014-03-08 02:16:07 +01:00
|
|
|
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
|
|
|
|
<% Array(subvalue).each do |asubvalue| -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-03-08 02:16:07 +01:00
|
|
|
<% end -%><% else -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<% Array(value).each do |asubvalue| -%>
|
|
|
|
<%= key %> <%= asubvalue %>;
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-03-08 02:16:07 +01:00
|
|
|
<% end -%>
|
2013-11-22 05:04:39 +01:00
|
|
|
<% end -%><% end -%>
|
2013-07-17 20:42:57 +02:00
|
|
|
alias <%= @location_alias %>;
|
2014-04-24 07:11:21 +02:00
|
|
|
<% if defined? @autoindex -%>
|
|
|
|
autoindex <%= @autoindex %>;
|
|
|
|
<% end -%>
|
2013-07-17 20:42:57 +02:00
|
|
|
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
2014-03-05 13:22:50 +01:00
|
|
|
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
|
2014-03-07 15:20:58 +01:00
|
|
|
<% Array(subvalue).each do |asubvalue| -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-03-05 13:22:50 +01:00
|
|
|
<% end -%><% else -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<% Array(value).each do |asubvalue| -%>
|
|
|
|
<%= key %> <%= asubvalue %>;
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-03-05 13:22:50 +01:00
|
|
|
<% end -%>
|
2013-11-22 05:04:39 +01:00
|
|
|
<% end -%><% end -%>
|
2014-03-10 10:38:16 +01:00
|
|
|
<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%>
|
|
|
|
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
|
|
|
|
<% Array(subvalue).each do |asubvalue| -%>
|
2014-04-12 21:17:45 +02:00
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>
|
2014-03-10 10:38:16 +01:00
|
|
|
<% end -%>
|
|
|
|
<% end -%><% else -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<% Array(value).each do |asubvalue| -%>
|
2014-04-12 21:17:45 +02:00
|
|
|
<%= key %> <%= asubvalue %>
|
2014-03-10 10:38:16 +01:00
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2014-03-08 02:32:40 +01:00
|
|
|
<% end -%><% end -%>
|
2012-09-24 17:21:35 +02:00
|
|
|
}
|