Welcome! Log In Create A New Profile

Advanced

Re: Port redirect in URL

Francis Daly
April 21, 2016 10:56AM
On Thu, Apr 21, 2016 at 10:41:24AM -0400, Jim Ohlstein wrote:
> On 4/21/16 10:17 AM, Igor Sysoev wrote:
> >>On 21 Apr 2016, at 17:09, Jim Ohlstein <jim@ohlste.in> wrote:

Hi there,

> >>> location / {
> >>> proxy_pass http://10.0.250.37:8000;
> >>> proxy_set_header Host $host;

> >proxy_redirect https://lists.mydomain.com:8000/ /;
>
> Same result. I believe I had tried it already. To make certain I
> wasn't seeing a cached response I checked with curl:
>
> curl -I https://lists.mydomain.com

> Location: http://lists.mydomain.com:8000/mailman/listinfo

If that is the line that comes back from the proxy_pass'ed server to
nginx, then you want

proxy_redirect http://lists.mydomain.com:8000/ /;

(where the first argument to proxy_redirect is the string that you want
to replace with the second argument, allowing for scheme://host to be
added later.)

If you can do without the "proxy_set_header Host" line, then you can
possibly do without proxy_redirect altogether (as in: use "proxy_redirect
default;" implicitly).

f
--
Francis Daly francis@daoine.org

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

Port redirect in URL

Jim Ohlstein April 21, 2016 10:10AM

Re: Port redirect in URL

Igor Sysoev April 21, 2016 10:16AM

Re: Port redirect in URL

Igor Sysoev April 21, 2016 10:18AM

Re: Port redirect in URL

Jim Ohlstein April 21, 2016 10:42AM

Re: Port redirect in URL

Igor Sysoev April 21, 2016 10:52AM

Re: Port redirect in URL

Jim Ohlstein April 21, 2016 11:06AM

Re: Port redirect in URL

Francis Daly April 21, 2016 10:56AM

Re: Port redirect in URL

Jim Ohlstein April 21, 2016 11:08AM

Re: Port redirect in URL

Jim Ohlstein April 21, 2016 10:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready