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