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 #1348

Merged

Conversation

SaschaDoering
Copy link
Contributor

Fixes GH-1347

Pull Request (PR) description

This makes it possible to define locations that are accepted over HTTP and only forward everything else to HTTPS. This allows, for example, to configure something like this:

nginx::resource::server { 'www.puppetlabs.com':
  ensure       => present,
  ssl          => true,
  ssl_cert     => '/etc/pki/tls/certs/blah.cert',
  ssl_key      => '/etc/pki/tls/private/blah.key',
  ssl_redirect => true,
  www_root     => '/var/www/www.puppetlabs.com',
}

nginx::resource::location { 'letsencrypt':
  location    => '^~ /.well-known/acme-challenge/',
  www_root    => '/var/www/letsencrypt',
  index_files => [],
  ssl         => false,
  server      => ['www.puppetlabs.com'],
}

Which results in a server accepting LetsEncrypt Challanges on HTTP and redirect everything else to HTTPS.

This Pull Request (PR) fixes the following issues

Fixes #1347

@SaschaDoering SaschaDoering force-pushed the 1347_mv_ssl_redirect_to_location branch 9 times, most recently from 373da60 to 9f58a07 Compare October 7, 2019 13:52
@SaschaDoering SaschaDoering force-pushed the 1347_mv_ssl_redirect_to_location branch from 9f58a07 to 61b5509 Compare October 7, 2019 14:01
@baurmatt baurmatt merged commit cdb39e0 into voxpupuli:master Oct 22, 2019
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
…_to_location

Move ssl_redirect into a location
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 this pull request may close these issues.

Move SSL redirect into a location
2 participants