Nginx reverse proxy regex help

Francis Daly francis at
Mon Sep 20 17:12:01 UTC 2021

On Sun, Sep 19, 2021 at 08:44:18AM -0400, blason wrote:

Hi there,

> Well actually while doing a curl request site is being moved and here is I
> am getting
> curl -vk https://xx.xx.xx/TestPage/

I'm not sure if this xx.xx.xx is a hostname or an IP address; or how it
compares to any of the previous strings.

"-k" is "accept the server certificate, no matter what"; that's a
reasonable test here, if your nginx is doing the same thing.

"-v" output would normally show the IP address that is connected to;
and the http response headers, which for a 301 redirect would include a
"Location:" header that may or may not match something that nginx expects
to modify before it returns it to the client.

All of that information should help you see where things start to go wrong.

It looks like in your follow-up mail, you have found a configuration
that works, by making sure that the back-end is using the site that you
want it to be using for this request from the nginx server.

Good stuff!


Francis Daly        francis at

More information about the nginx mailing list