Welcome! Log In Create A New Profile

Advanced

Re: Nginx proxy_pass not working as expected.

Francis Daly
October 28, 2016 12:34PM
On Fri, Oct 28, 2016 at 10:17:11AM -0400, stuwat wrote:

Hi there,

> 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
to http://example.github.io/.

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.)

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx proxy_pass not working as expected.

stuwat October 28, 2016 09:12AM

Re: Nginx proxy_pass not working as expected.

jeffdyke October 28, 2016 10:04AM

Re: Nginx proxy_pass not working as expected.

stuwat October 28, 2016 10:17AM

Re: Nginx proxy_pass not working as expected.

Francis Daly October 28, 2016 12:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready