Skip to content

Commit

Permalink
Add reject_response and listen_options to ssl header
Browse files Browse the repository at this point in the history
  • Loading branch information
kcampos committed Apr 9, 2015
1 parent c598bef commit 9a13558
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion templates/vhost/vhost_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ server {
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(" ") %>;
<% if @reject_response -%> return 444;<% end -%>
<% if @reject_response -%>
return 444;
<% end -%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/<%= @name %>.access.log;
<% if @server_www_root -%>
root <%= @server_www_root %>;
Expand Down
5 changes: 4 additions & 1 deletion templates/vhost/vhost_ssl_header.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
server {
listen <%= @ssl_port %>;
listen <%= @ssl_port %> <% if @listen_options %><%= @listen_options %><% end %>;
<% if @ipv6_enable && (defined? @ipaddress6) %>
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(" ") %>;
<% if @reject_response -%>
return 444;
<% end -%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir') -%>/<%= @name -%>.access.log;
<% if @server_www_root -%>
root <%= @server_www_root %>;
Expand Down

0 comments on commit 9a13558

Please sign in to comment.