From baf29c9b250ae420421bcb61adb529a013bf4d9e Mon Sep 17 00:00:00 2001 From: mc0e Date: Sat, 20 Oct 2012 03:48:50 +1200 Subject: [PATCH] Update templates/fcgi_site.erb Change the determining factor for deciding to use SSL. This allows a user to put more than just the port into the listen directive. eg: nginx::fcgi::site { 'default-ssl': listen => '443 default_server ssl', ... } Later versions of nginx support this mode of configuration. When using a wildcard SSL cert it is possible to have multiple domains on a single IP, so the 'default_server' switch is significant. If running multiple sites on different IPs, then the user would want to set listen => 'example.com:443' which is also handled better with this switch. --- templates/fcgi_site.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/fcgi_site.erb b/templates/fcgi_site.erb index 7cb13f1..017717f 100644 --- a/templates/fcgi_site.erb +++ b/templates/fcgi_site.erb @@ -7,7 +7,7 @@ server { root <%= root %>; -<% if listen == '443' %> +<% if ssl_certificate_key %> ssl on; ssl_certificate <%= real_ssl_certificate %>; ssl_certificate_key <%= real_ssl_certificate_key %>;