module-nginx/templates/vhost/vhost_ssl_header.erb

26 lines
1.2 KiB
Text
Raw Normal View History

2011-06-07 00:25:04 +02:00
server {
2013-07-17 20:42:57 +02:00
listen <%= @listen_ip %>:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @listen_options %><%= @listen_options %><% end %>;
<% if @ipv6_enable == 'true' && (defined? ipaddress6) %>
listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %> ipv6only=on;
2012-11-08 19:59:17 +01:00
<% end %>
2013-07-17 20:42:57 +02:00
server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>;
2011-06-07 00:25:04 +02:00
ssl on;
2013-07-17 20:42:57 +02:00
ssl_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.crt;
ssl_certificate_key <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
2013-07-17 20:42:57 +02:00
ssl_protocols <%= @ssl_protocols %>;
ssl_ciphers <%= @ssl_ciphers %>;
ssl_prefer_server_ciphers on;
<% if defined? @auth_basic -%>
2013-07-17 20:42:57 +02:00
auth_basic "<%= @auth_basic %>";
<% end -%>
<% if defined? @auth_basic_user_file -%>
2013-07-17 20:42:57 +02:00
auth_basic_user_file <%= @auth_basic_user_file %>;
<% end -%>
2013-08-07 15:59:44 +02:00
access_log <%= @ssl_access_log %>;
error_log <%= @ssl_error_log %>;