Welcome! Log In Create A New Profile

Advanced

Re: https redirect going to infinite loop

July 12, 2013 05:08AM
Hello Francis,

Here is the curl o/p executed from browser machine.

c:\curl>curl.exe -i http://example.com
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Date: Fri, 12 Jul 2013 08:53:12 GMT
Location: https://example.com
Server: nginx/1.2.8
Content-Length: 184
Connection: keep-alive

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.2.8</center>
</body>
</html>

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?
Yes

>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.

Regards,
Parul Sood
SubjectAuthorPosted

https redirect going to infinite loop

parulsood85July 11, 2013 07:27AM

Re: https redirect going to infinite loop

Francis DalyJuly 11, 2013 06:16PM

Re: https redirect going to infinite loop

parulsood85July 12, 2013 02:50AM

Re: https redirect going to infinite loop

parulsood85July 12, 2013 02:50AM

Re: https redirect going to infinite loop

Francis DalyJuly 12, 2013 04:12AM

Re: https redirect going to infinite loop

parulsood85July 12, 2013 05:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 76
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready