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
Subject Author Posted

https redirect going to infinite loop

parulsood85 July 11, 2013 07:27AM

Re: https redirect going to infinite loop

Francis Daly July 11, 2013 06:16PM

Re: https redirect going to infinite loop

parulsood85 July 12, 2013 02:50AM

Re: https redirect going to infinite loop

parulsood85 July 12, 2013 02:50AM

Re: https redirect going to infinite loop

Francis Daly July 12, 2013 04:12AM

Re: https redirect going to infinite loop

parulsood85 July 12, 2013 05:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 248
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready