module-nginx/templates/vhost/vhost_location_fastcgi.erb
2014-01-17 20:08:01 +04:00

29 lines
1 KiB
Text

location <%= @location %> {
<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%>
<%= key %> <%= value %>;
<% end -%><% end -%>
<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |value| -%>
<%= value %>
<% end -%><% end -%>
<% if defined? @www_root -%>
root <%= @www_root %>;
<% end -%>
<% if @fastcgi_split_path -%>
fastcgi_split_path_info <%= @fastcgi_split_path %>;
<% end -%>
<% if @try_files -%>
try_files<% @try_files.each do |try| -%> <%= try %><% end -%>;
<% end -%>
include <%= @fastcgi_params %>;
fastcgi_pass <%= @fastcgi %>;
<% if defined? @fastcgi_script %>
fastcgi_param SCRIPT_FILENAME <%= @fastcgi_script %>;
<% end -%>
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
<%= key %> <%= value %>;
<% end -%><% end -%>
<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |value| -%>
<%= value %>
<% end -%><% end -%>
}