https redirect going to infinite loop

Francis Daly francis at daoine.org
Thu Jul 11 22:14:39 UTC 2013


On Thu, Jul 11, 2013 at 07:27:14AM -0400, parulsood85 wrote:

Hi there,

> I am new to nginx. I am trying to redirect all request to https. This is the
> redirect i am using
> 
> rewrite  ^/(.*)  https://example.com  permanent;

What server{} block is this in?

What "listen" or similar directives apply in that block?

> somehow when I hit http://example.com on browser it goes to infinite loop. 

What is the output when you do "curl -i http://example.com"?

And if it is a redirect, what is the output when you do a "curl -i"
on the redirected Location:?

> Note: ssl is enabled on the load balancer

Where is the load balancer in relation to nginx and the browser? What
does the load balancer do?

> Please help!

If you can provide the above details, it may be clearer where the problem
is and what the resolution is.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list