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

Move SSL redirect into a location #1347

Closed
SaschaDoering opened this issue Oct 4, 2019 · 0 comments · Fixed by #1348
Closed

Move SSL redirect into a location #1347

SaschaDoering opened this issue Oct 4, 2019 · 0 comments · Fixed by #1348

Comments

@SaschaDoering
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.7.2
  • Distribution: Ubuntu 16.04 LTS
  • Module version: 0.16.0

How to reproduce (e.g Puppet code you use)

Nginx::Resource::Server { 'servername.net':
  access_log   => /var/log/nginx/servername.net.access.log,
  error_log    => /var/log/nginx/servername.net.error.log,
  format_log   => proxy,
  ssl          => true,
  ssl_redirect => true,
  ssl_key.     => /etc/ssl/servername.net.pem,
  ssl_cert     => /etc/ssl/servername.net.pem,
  proxy        => http://backend,
}

What are you seeing

I get this HTTP section in my server:

# MANAGED BY PUPPET
server {
  listen *:80;

  server_name           servername.net;


  return 301 https://$host$request_uri;
  access_log            /var/log/nginx/servername.net.access.log proxy;
  error_log             /var/log/nginx/servername.net.error.log;

}

Whis is absolutely correct, but ...

What behaviour did you expect instead

... every location I define for the HTTP section of this server is useless which makes it hard to define e.g. a LetsEncrypt location.

SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 4, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 4, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 4, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 4, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 4, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
SaschaDoering added a commit to syseleven/puppet-nginx that referenced this issue Oct 7, 2019
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this issue Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant