Help noob with redirection
igor at sysoev.ru
Wed Jun 9 16:33:25 MSD 2010
On Wed, Jun 09, 2010 at 01:30:47PM +0100, --[ UxBoD ]-- wrote:
> ----- Original Message -----
> > On Wed, Jun 09, 2010 at 01:19:00PM +0100, --[ UxBoD ]-- wrote:
> > > > proxy_redirect https://pm01.domain.com/ /;
> > > > proxy_redirect https://pm02.domain.com/ /;
> > > >
> > > >
> > > Igor, that works now using the above syntax :) A question though is
> > > there anyway to tell NGINX to redirect based on the proxied hostname
> > > ? If we had pm01 ... 100 then I would need to add 100 proxy_redirect
> > > statements or can it be done with a clever single line ?
> > Currently nginx does not support variables in the first parameter,
> > so you have to add 100 proxy_redirect statements.
> > The other way is to configure backends to use single name as main
> > server name
> > to use it in redirects.
> Sorry Igor, having a mind blank! Do you mean by using DNS eg. pm.domain.com IN A 184.108.40.206
> IN A 220.127.116.11
Not exactly this.
If you use Apache you should set
on every instance.
More information about the nginx