module-nginx/templates/vhost/vhost_location_directory.erb

31 lines
1,013 B
Text
Raw Normal View History

2013-07-17 20:42:57 +02:00
location <%= @location %> {
<% if @location_allow -%><% @location_allow.each do |allow_rule| -%>
2013-11-22 04:35:44 +01:00
allow <%= allow_rule %>;
<% end -%><% end -%>
<% if @location_deny -%><% @location_deny.each do |deny_rule| -%>
2013-11-22 04:35:44 +01:00
deny <%= deny_rule %>;
<% 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 -%>
2013-07-17 20:42:57 +02:00
root <%= @www_root %>;
<% end -%>
<% if @try_files -%>
try_files<% @try_files.each do |try| -%> <%= try %><% end -%>;
<% end -%>
2013-07-17 20:42:57 +02:00
<% if @index_files -%>
2013-08-23 10:58:43 +02:00
index <% @index_files.each do |i| %> <%= i %><% end %>;
<% end -%>
<% if defined? auth_basic -%>
2013-07-17 20:42:57 +02:00
auth_basic "<%= @auth_basic %>";
<% end -%>
<% if defined? auth_basic_user_file -%>
2013-07-17 20:42:57 +02:00
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 -%>
}