https redirect going to infinite loop
nginx-forum at nginx.us
Fri Jul 12 09:08:45 UTC 2013
Here is the curl o/p executed from browser machine.
c:\curl>curl.exe -i http://example.com
HTTP/1.1 301 Moved Permanently
Date: Fri, 12 Jul 2013 08:53:12 GMT
<head><title>301 Moved Permanently</title></head>
<center><h1>301 Moved Permanently</h1></center>
However I noticed that when I put a https redirect like below, it works
rewrite ^/test$ https://example.com permanent;
>So: the loadbalancer listens for http and https, and sends both requests
to nginx as http?
>Do the http-to-https redirect on the load balancer, which knows whether
the initial request was http or https.
>Or configure the load balancer to give a clue to nginx whether the
initial request was http or https, and configure your nginx to respond
to that clue.
I'll work on this, I think this option should work fine.
Thanks for the help.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240755,240775#msg-240775
More information about the nginx