balancer redirecting to wrong port

jeff emminger jemminger at gmail.com
Sat Jul 26 01:21:53 MSD 2008


I have a strange thing happening, we're running a balancer for two machines:

upstream secure_cluster {
  ip_hash;
  server 208.78.100.210:80;
  server 67.207.149.67:80;
}

We're rewriting requests on port 80 to 443:

server {
    listen 208.78.98.50:80;
    server_name secure.mysite.com;
    rewrite ^ https://secure.mysite.com$uri permanent;
}

The balancer is under SSL but the upstream machines are not.  If I go
to https://secure.mysite.com/subscribe (with no trailing slash) I get
redirected to http://app1.mysite.com/subscribe/ (no longer under
SSL)..

If I go to https://secure.mysite.com/subscribe/ (including trailing
slash) then it stays on that URL as expected.

nginx 0.6.31

Any ideas?
Jeff





More information about the nginx mailing list