Welcome! Log In Create A New Profile

Advanced

Re: Rewrite to a different host (round robin)

May 28, 2017 05:54PM
Using the answer at
https://serverfault.com/questions/597671/load-balancing-in-nginx-with-redirect-rather-than-proxy
as a basis, why not set $loc_redirect to the upstream host name, and then

|location / { |||return 302 $scheme://$loc_redirect$request_uri;| }|

( although negating the stickiness of the upstream redirect may have the
odd unwanted site effect ).

On 26/05/17 03:36, Jesus arteche wrote:
> I wouldn't like to consume bandwidth on the server with NGINX, and I
> don't have DNS server ( I can not for technical reasons), so it has to
> be IP rewrite or redirect :)
>
> On Thu, May 25, 2017 at 1:40 PM, Reinis Rozitis <r@roze.lv
> <mailto:r@roze.lv>> wrote:
>
> > Any idea how to do it?
>
> Is there a reason why do you want to do it with nginx rather than
> for example a simple DNS round robin?
> (especially if as per your previous mail - you don't want to send
> the traffic through the nginx loadbalancer)
>
> rr
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org <mailto:nginx@nginx.org>
> http://mailman.nginx.org/mailman/listinfo/nginx
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

--
Steve Holdoway BSc(Hons) MIITP
https://www.greengecko.co.nz/
Linkedin: https://www.linkedin.com/in/steveholdoway
Skype: sholdowa

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

Rewrite to a different host (round robin)

Jesus arteche May 25, 2017 06:16AM

RE: Rewrite to a different host (round robin)

Reinis Rozitis May 25, 2017 08:42AM

Re: Rewrite to a different host (round robin)

Jesus arteche May 25, 2017 11:38AM

Re: Rewrite to a different host (round robin)

GreenGecko May 28, 2017 05:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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