From 7b80b1a3c6fb151fc523b9781ab0cdfcdf0fe553 Mon Sep 17 00:00:00 2001 From: Steffen Zieger Date: Mon, 2 Jun 2014 00:23:07 +0200 Subject: [PATCH] make ssl listen option configurable --- manifests/resource/vhost.pp | 2 ++ templates/vhost/vhost_ssl_header.erb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index e2647b690..fd43024d8 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -137,6 +137,7 @@ $ipv6_listen_options = 'default ipv6only=on', $add_header = undef, $ssl = false, + $ssl_listen_option = true, $ssl_cert = undef, $ssl_dhparam = undef, $ssl_key = undef, @@ -219,6 +220,7 @@ if ($ssl_cert != undef) { validate_string($ssl_cert) } + validate_bool($ssl_listen_option) if ($ssl_dhparam != undef) { validate_string($ssl_dhparam) } diff --git a/templates/vhost/vhost_ssl_header.erb b/templates/vhost/vhost_ssl_header.erb index b097c3b2b..984f03ffa 100644 --- a/templates/vhost/vhost_ssl_header.erb +++ b/templates/vhost/vhost_ssl_header.erb @@ -1,5 +1,5 @@ server { - listen <%= @listen_ip %>:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @listen_options %> <%= @listen_options %><% end %>; + listen <%= @listen_ip %>:<%= @ssl_port %> <% if @ssl_listen_option %>ssl<% end %><% if @spdy == 'on' %> spdy<% end %><% if @listen_options %> <%= @listen_options %><% end %>; <% if @ipv6_enable && (defined? @ipaddress6) %> listen [<%= @ipv6_listen_ip %>]:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @ipv6_listen_options %> <%= @ipv6_listen_options %><% end %>; <% end %>