Welcome! Log In Create A New Profile

Advanced

Re: Proxy Pass based on the first field in the URI

meir hazon
September 12, 2019 03:36AM
Dear Francis and friends,

I am sorry if I wasn't clear enough, I appreciate your help and advice
dearly.

I was thinking on creating environments dynamically, Meaning,

1. the source "host" of the URL is random

2. The first field of the URI includes a random string with the environment
ID.

3. Based on this ID a proxy pass is added (I will add DNS records etc.)

4. The proxy pass points to a static "host" and the URI includes the
original URI excluding the first filed (env ID field)

Meaning that I will need a good rewrite and an "if" statement for each one
of the environments (IDs)

Could you please

On Wed, Sep 11, 2019 at 11:48 PM Francis Daly <francis@daoine.org> wrote:

> On Wed, Sep 11, 2019 at 08:41:15PM +0200, meir hazon wrote:
>
> Hi there,
>
> > I don't think so, it should always be the first field of the URI but it
> > would be a random string. I have to proxy pass and rebuild the new URI
> > based on location at the original URI only.
>
> I don't understand what your requirements are.
>
> > > > https://yyy.com/bla/aa/er
> > > > if $1 == bla proxy pass to http://xxx.com/aa/er
> > > > if $1 == vv proxy pass to http://ccc.com/aa/er
>
> "bla" is not random; it is a thing that you know that maps to xxx.com.
>
> "vv" is not random; it is a thing that you know that maps to ccc.com.
>
> So, somewhere, you have a list of the uri prefix / upstream server
> mappings, no?
>
> Use that list to make the nginx config.
>
> > Could you think of a way to do this?
>
> Not without me understanding what "this" is.
>
> Good luck with it,
>
> f
> --
> Francis Daly francis@daoine.org
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxy Pass based on the first field in the URI

meir hazon September 11, 2019 10:46AM

Re: Proxy Pass based on the first field in the URI

Francis Daly September 11, 2019 11:48AM

Re: Proxy Pass based on the first field in the URI

meir hazon September 11, 2019 02:42PM

Re: Proxy Pass based on the first field in the URI

Francis Daly September 11, 2019 05:50PM

Re: Proxy Pass based on the first field in the URI

meir hazon September 12, 2019 03:36AM

Re: Proxy Pass based on the first field in the URI

meir hazon September 12, 2019 03:42AM

Re: Proxy Pass based on the first field in the URI

j94305 September 11, 2019 11:55AM

Re: Proxy Pass based on the first field in the URI

meir hazon September 11, 2019 02:44PM

Re: Proxy Pass based on the first field in the URI

j94305 September 14, 2019 06:17PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
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