Nginx proxy_pass not working as expected.
francis at daoine.org
Fri Oct 28 16:32:14 UTC 2016
On Fri, Oct 28, 2016 at 10:17:11AM -0400, stuwat wrote:
> We're trying to point example.com at a site hosted at github...
In general, you proxy_pass to something that you control.
> So we need example.com to point to the site hosted at example.github.io
> So a user visits example.com they get the page hosted at example.github.com,
> but with example.com 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 http://example.github.com", 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
example.github.io which does not go anywhere near your nginx.
Perhaps if you did a proxy_pass to http://example.github.io it would
work better? (At least, until that remote web site chooses to redirect
you somewhere else as well.)
Francis Daly francis at daoine.org
More information about the nginx