39 строки
1,2 КиБ
Text
39 строки
1,2 КиБ
Text
<% if @include_files %>
|
|
<%- @include_files.each do |file| -%>
|
|
include <%= file %>;
|
|
<%- end -%>
|
|
<% end -%>
|
|
<% 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.sort_by{ |k, v| k}.each do |subkey,subvalue| -%>
|
|
<%- Array(subvalue).each do |asubvalue| -%>
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- else -%>
|
|
<%- Array(value).each do |asubvalue| -%>
|
|
<%= key %> <%= asubvalue %>;
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<% end -%>
|
|
<% 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) -%>
|
|
<%- value.sort_by{ |k, v| k}.each do |subkey,subvalue| -%>
|
|
<%- Array(subvalue).each do |asubvalue| -%>
|
|
<%= key %> <%= subkey %> <%= asubvalue %>;
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- else -%>
|
|
<%- Array(value).each do |asubvalue| -%>
|
|
<%= key %> <%= asubvalue %>;
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<%- end -%>
|
|
<% end -%>
|
|
<% Array(@raw_append).each do |line| -%>
|
|
<%= line %>
|
|
<% end -%>
|
|
}
|