Nginx proxy_pass not working as expected.

Francis Daly francis at
Fri Oct 28 16:32:14 UTC 2016

On Fri, Oct 28, 2016 at 10:17:11AM -0400, stuwat wrote:

Hi there,

> We're trying to point at a site hosted at github...

In general, you proxy_pass to something that you control.

> So we need to point to the site hosted at
> So a user visits they get the page hosted at,
> but with still in the address bar.

You have listed two different github domains there. And neither matches
the domain in your example config.

Right now, if I "curl -v", I get a http redirect

When your nginx does that, it will get the same response, and pass
it to the browser. And then the browser will make a fresh request to which does not go anywhere near your nginx.

Perhaps if you did a proxy_pass to it would
work better? (At least, until that remote web site chooses to redirect
you somewhere else as well.)

Francis Daly        francis at

More information about the nginx mailing list