|
1 | 1 | server { |
2 | | -<% if @vhost_cfg_prepend -%><% vhost_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> |
| 2 | +<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> |
3 | 3 | <%= key %> <%= value %>; |
4 | 4 | <% end -%><% end -%> |
5 | 5 |
|
6 | | - listen <%= listen_ip %>:<%= listen_port %> <% if @listen_options %><%= listen_options %><% end %>; |
| 6 | + listen <%= @listen_ip %>:<%= @listen_port %> <% if @listen_options %><%= @listen_options %><% end %>; |
7 | 7 | <% # check to see if ipv6 support exists in the kernel before applying %> |
8 | | - <% if ipv6_enable == 'true' && (defined? ipaddress6) %> |
9 | | - listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on; |
| 8 | + <% if @ipv6_enable == 'true' && (defined? @ipaddress6) %> |
| 9 | + listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on; |
10 | 10 | <% end %> |
11 | | - server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>; |
| 11 | + server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>; |
12 | 12 | access_log <%= @logdir %>/<%= @access_log %>; |
13 | | - <% if defined? auth_basic -%> |
14 | | -auth_basic "<%= auth_basic %>"; |
| 13 | + <% if defined? @auth_basic -%> |
| 14 | +auth_basic "<%= @auth_basic %>"; |
15 | 15 | <% end -%> |
16 | | - <% if defined? auth_basic_user_file -%> |
17 | | -auth_basic_user_file <%= auth_basic_user_file %>; |
| 16 | + <% if defined? @auth_basic_user_file -%> |
| 17 | +auth_basic_user_file <%= @auth_basic_user_file %>; |
18 | 18 | <% end -%> |
19 | 19 |
|
20 | | - <% proxy_set_header.each do |header| %> |
| 20 | + <% @proxy_set_header.each do |header| %> |
21 | 21 | proxy_set_header <%= header %>;<% end %> |
22 | 22 | <% if @rewrite_to_https %> |
23 | 23 | if ($ssl_protocol = "") { |
|
0 commit comments