-
-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from guruHub/pull_listen_option
Added listen_options and ipv6_listen_options feature
- Loading branch information
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
server { | ||
listen <%= listen_ip %>; | ||
listen <%= listen_ip %>:<%= listen_port %> <% if @listen_options %><%= listen_options %><% end %>; | ||
<% # check to see if ipv6 support exists in the kernel before applying %> | ||
<% if ipv6_enable == 'true' && (defined? ipaddress6) %> | ||
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> default ipv6only=on; | ||
listen [<%= ipv6_listen_ip %>]:<%= ipv6_listen_port %> <% if @ipv6_listen_options %><%= ipv6_listen_options %><% end %> ipv6only=on; | ||
<% end %> | ||
server_name <%= rewrite_www_to_non_www ? name.gsub(/^www\./, '') : server_name.join(" ") %>; | ||
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/<%= name %>.access.log; |