Welcome! Log In Create A New Profile

Advanced

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

Francis Daly
November 16, 2017 05:58PM
On Thu, Nov 16, 2017 at 09:59:49PM +0100, Ruben wrote:

Hi there,

> location / {
> proxy_pass http://$instance;
> }

> The problem is, when I go to http://example.com/cdn/test/test.jpg in the
> browser, it redirects me to http://instance-001/cdn/test/test.jpg. Which is
> ofcourse not correct. It should proxy the docker service with name
> instance-001.

Are you reporting that nginx creates the redirect, or that nginx passes
along the redirect that the upstream web server creates?

The two cases probably have different fixes.

What do the (nginx and upstream web server) logs say?

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx dynamic proxy_pass keeps redirecting to wrong domain

rsdrsd November 16, 2017 04:02PM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

Francis Daly November 16, 2017 05:58PM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

rsdrsd November 16, 2017 10:50PM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

pbooth November 16, 2017 10:56PM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

Francis Daly November 17, 2017 02:54AM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

rsdrsd November 17, 2017 08:18AM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

Francis Daly November 17, 2017 09:04AM

Re: Nginx dynamic proxy_pass keeps redirecting to wrong domain

rsdrsd November 18, 2017 12:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready