2011-06-07 00:25:04 +02:00
|
|
|
server {
|
2012-10-03 23:16:18 +02:00
|
|
|
listen <%= listen_ip %>:<%= listen_port %> <% if @listen_options %><%= listen_options %><% end %>;
|
2011-06-07 00:25:04 +02:00
|
|
|
<% # check to see if ipv6 support exists in the kernel before applying %>
|
2012-09-01 17:51:30 +02:00
|
|
|
<% if ipv6_enable == 'true' && (defined? ipaddress6) %>
|
2012-10-03 23:16:18 +02:00
|
|
|
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on;
|
2012-09-01 17:51:30 +02:00
|
|
|
<% end %>
|
2012-09-27 16:42:53 +02:00
|
|
|
server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>;
|
2012-09-01 17:51:30 +02:00
|
|
|
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/<%= name %>.access.log;
|
2013-04-24 10:42:06 +02:00
|
|
|
|
|
|
|
<% proxy_set_header.each do |header| %>
|
|
|
|
proxy_set_header <%= header %>;<% end %>
|