make ssl listen option configurable

This commit is contained in:
Steffen Zieger 2014-06-02 00:23:07 +02:00
parent ce2bd7f068
commit 7b80b1a3c6
2 changed files with 3 additions and 1 deletions

View file

@ -137,6 +137,7 @@ define nginx::resource::vhost (
$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 @@ define nginx::resource::vhost (
if ($ssl_cert != undef) {
validate_string($ssl_cert)
}
validate_bool($ssl_listen_option)
if ($ssl_dhparam != undef) {
validate_string($ssl_dhparam)
}

View file

@ -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 %>