module-nginx/templates/vhost/vhost_footer.erb

28 lines
881 B
Text
Raw Normal View History

<% if @include_files -%>
<%- @include_files.each do |file| -%>
include <%= file %>;
<%- end -%>
<% end -%>
<%# make sure that allow comes before deny by forcing the allow key (if it -%>
<%# exists) to be first in the output order. The hash keys also need to be -%>
<%# sorted so that the ordering is stable. -%>
<% if @vhost_cfg_append -%>
<%- @vhost_cfg_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%>
<%- 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 %>;
<%- end -%>
<%- end -%>
<%- else -%>
<%- Array(value).each do |asubvalue| -%>
2014-03-11 16:09:59 +01:00
<%= key %> <%= asubvalue %>;
<%- end -%>
<%- end -%>
<%- end -%>
2014-03-10 10:26:35 +01:00
<% end -%>
<% Array(@raw_append).each do |line| -%>
<%= line %>
<% end -%>
2011-06-07 00:25:04 +02:00
}