Conversation
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.
|
Hi, can merge this request because 'ssl_certificate_key' could be empty if you want tje module to autogenerate the certs |
|
Also changing value in $listen wont generate the cert if needed Autogenerating ssl certsif $listen == '443' [...] I had to find an other way manging this scenario. |
Note that there are circumstances where people want to run HTTPS on a non standard port, which might be an argument for solution 1. |
|
I wonder if autogenerating the ssl certs in the way you do it is ideal. It's pretty cool, but seems like it's as likely to be invoked by accident as on purpose. Would it be better to have the user set $ssl_certificate => 'snakeoil' where that's what's wanted? |
|
I think the module listen variable must have the same content (or almost) as the one in the nginx config file with the possibility to set :
I agree the way i do isnt ideal. Your proposal is I think a good alternative. I also want the module to be able to manage HTTP/HTTPS vhost (http://nginx.org/en/docs/http/configuring_https_servers.html#single_http_https_server). And have also news features to put into this module. (using parametrized classes rather than top-scope variables). So may be i will work a bit on this module to manage all of those scenarios. Benoit |
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',
...
}
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 change.