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

rewrite_to_https doesn't use different SSL port numbers correctly (fix included) #477

Closed
binary1230 opened this issue Oct 15, 2014 · 0 comments

Comments

@binary1230
Copy link

rewrite_to_https, if using the default port of 443, works fine.

if not using 443, it doesn't work because the line that puppet generates doesn't include the custom port number.

The fix is here in templates/vhost/vhost_header.rb:

change this:

  if ($ssl_protocol = "") {
       return 301 https://$host$request_uri;
  }

to this:

  if ($ssl_protocol = "") {
    return 301 https://$host<%if @ssl_port != 443%>:<%= @ssl_port %><% end %>$request_uri;
  }
binary1230 added a commit to magfest-archive/ubersystem-deploy that referenced this issue Oct 15, 2014
@3flex 3flex closed this as completed in abe4b49 Oct 23, 2014
danieldreier pushed a commit to danieldreier/puppet-nginx that referenced this issue Mar 25, 2015
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this issue Oct 23, 2017
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

No branches or pull requests

1 participant