Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont deploy "ssl on" on nginx 1.15 or newer (for mailhost) #1281

Merged
merged 2 commits into from
Feb 9, 2019

Conversation

rhykw
Copy link
Contributor

@rhykw rhykw commented Dec 8, 2018

Pull Request (PR) description

The ssl on syntax is deprecated since nginx 1.15.
This PR fixes it for mailhost.

This Pull Request (PR) fixes the following issues

fixes #1284

@ekohl ekohl requested a review from bastelfreak December 12, 2018 11:18
@bastelfreak bastelfreak added the bug Something isn't working label Dec 15, 2018
Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rhykw, thanks for fixing this! can you provide a short acceptance test so we know for sure that the generated config file works? We have some examples at https://github.com/voxpupuli/puppet-nginx/tree/master/spec/acceptance. You can join us on IRC at #voxpupuli on freenode or on slack at https://slack.puppet.com if you've any questions.

@rhykw
Copy link
Contributor Author

rhykw commented Dec 19, 2018

Yeah, give me a sec!

@bastelfreak
Copy link
Member

Hi @rhykw. Can you also provide an acceptance test for this?

@bastelfreak
Copy link
Member

Hi. I verifid this with the docs and rebased the branch. I will merge it after travis turns green. Thanks for the contribution!

@bastelfreak bastelfreak merged commit 5dfea45 into voxpupuli:master Feb 9, 2019
@@ -20,10 +20,10 @@ server {
<% end -%>
<%- if @listen_ip.is_a?(Array) then -%>
<%- @listen_ip.each do |ip| -%>
listen <%= ip %>:<%= @ssl_port %>;
listen <%= ip %>:<%= @ssl_port %><% unless @add_listen_directive -%> ssl<% end -%>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is broken I think (will be fixed as part of #1330).
The problem is @add_listen_directive is not in scope. Since it's always nil and nil is falsey, ssl is always added to the line.

@@ -485,7 +485,7 @@
title: 'should set the IPv4 SSL listen port',
attr: 'ssl_port',
value: 45,
match: ' listen *:45;'
match: ' listen *:45 ssl;'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, ssl should not have appeared as the nginx_version fact isn't being set and add_listen_directive is therefore true.

Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
dont deploy "ssl on" on nginx 1.15 or newer (for mailhost)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead (mailhost)
4 participants