too many redirects

Francis Daly francis at
Fri Nov 21 00:09:44 UTC 2014

On Thu, Nov 20, 2014 at 10:07:22PM +0100, JACK LINKERS wrote:

You probably already have the answer now, but just in case not...

> I completely lost...
> I tried everything (of my understanding) with no success.

Your original config was:

 listen on http and https; redirect everything to https.

That's a recipe for an infinite loop, as your browser reported.

What you probably want is:

 listen on http; redirect everything to https.
 listen on https; process requests normally.

which is most easily done with two separate server{} blocks.

Francis Daly        francis at

More information about the nginx mailing list