module-nginx/templates/vhost/locations/fastcgi.erb
Carl P. Corliss fb880576a6 cleanup resultant whitespace and key/value alignment in config files
- fix tests related to whitespace changes
2014-09-13 04:13:18 -04:00

22 lines
846 B
Text

<% if defined? @www_root -%>
root <%= @www_root %>;
<% end -%>
include <%= @fastcgi_params %>;
<% if @try_files -%>
try_files <% @try_files.each do |try| -%> <%= try %><% end -%>;
<% end -%>
fastcgi_pass <%= @fastcgi %>;
<% if @fastcgi_split_path -%>
fastcgi_split_path_info <%= @fastcgi_split_path %>;
<% end -%>
<% if defined? @fastcgi_script -%>
<%-# this setting can be overridden by setting it in the fastcgi_param hash too %>
<%- @fastcgi_param = { 'SCRIPT_FILENAME' => @fastcgi_script }.merge(@fastcgi_param || {}) -%>
<% end -%>
<% if defined? @fastcgi_param -%>
<%- field_width = @fastcgi_param.inject(0) { |l,(k,v)| k.size > l ? k.size : l } -%>
<%- @fastcgi_param.each do |key, val| -%>
fastcgi_param <%= sprintf("%-*s", field_width, key) %> <%= val %>;
<%- end -%>
<% end -%>