2014-06-26 05:40:22 +02:00
|
|
|
<% if @include_files %>
|
|
|
|
<%- @include_files.each do |file| -%>
|
|
|
|
include <%= file %>;
|
|
|
|
<%- end -%>
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-06-26 05:40:22 +02:00
|
|
|
<% 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) -%>
|
2014-12-17 09:20:24 +01:00
|
|
|
<%- value.sort_by{ |k, v| k}.each do |subkey,subvalue| -%>
|
2014-06-26 05:40:22 +02:00
|
|
|
<%- Array(subvalue).each do |asubvalue| -%>
|
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
|
|
|
<%- else -%>
|
|
|
|
<%- Array(value).each do |asubvalue| -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<%= key %> <%= asubvalue %>;
|
2014-06-26 05:40:22 +02:00
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-06-26 05:40:22 +02:00
|
|
|
<% if @vhost_cfg_ssl_append -%>
|
|
|
|
<%- @vhost_cfg_ssl_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%>
|
|
|
|
<%- if value.is_a?(Hash) -%>
|
2014-12-17 09:20:24 +01:00
|
|
|
<%- value.sort_by{ |k, v| k}.each do |subkey,subvalue| -%>
|
2014-06-26 05:40:22 +02:00
|
|
|
<%- Array(subvalue).each do |asubvalue| -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
2014-06-26 05:40:22 +02:00
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
|
|
|
<%- else -%>
|
|
|
|
<%- Array(value).each do |asubvalue| -%>
|
2014-03-11 16:09:59 +01:00
|
|
|
<%= key %> <%= asubvalue %>;
|
2014-06-26 05:40:22 +02:00
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
2014-03-10 10:26:35 +01:00
|
|
|
<% end -%>
|
2014-06-26 05:40:22 +02:00
|
|
|
<% Array(@raw_append).each do |line| -%>
|
|
|
|
<%= line %>
|
2014-03-08 02:16:07 +01:00
|
|
|
<% end -%>
|
2013-07-21 17:20:07 +02:00
|
|
|
}
|