<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Using the answer at
<a class="moz-txt-link-freetext" href="https://serverfault.com/questions/597671/load-balancing-in-nginx-with-redirect-rather-than-proxy">https://serverfault.com/questions/597671/load-balancing-in-nginx-with-redirect-rather-than-proxy</a>
      as a basis, why not set $loc_redirect to the upstream host name,
      and then</p>
    <pre><code>location / {
 </code><code><code>return 302 $scheme://$loc_redirect$request_uri;</code>
}</code></pre>
    ( although negating the stickiness of the upstream redirect may have
    the odd unwanted site effect ).<br>
    <br>
    <div class="moz-cite-prefix">On 26/05/17 03:36, Jesus arteche wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAM50+xqqaRvTur1CDvHsDzCW3VbGpfwKmHM8UP=hAzov6Bxk9A@mail.gmail.com">
      <div dir="ltr">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 :)<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, May 25, 2017 at 1:40 PM, Reinis
          Rozitis <span dir="ltr"><<a href="mailto:r@roze.lv"
              target="_blank" moz-do-not-send="true">r@roze.lv</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
              class="">> Any idea how to do it?<br>
              <br>
            </span>Is there a reason why do you want to do it with nginx
            rather than for example a simple DNS round robin?<br>
            (especially if as per your previous mail - you don't want to
            send the traffic through the nginx loadbalancer)<br>
            <br>
            rr<br>
            <br>
            ______________________________<wbr>_________________<br>
            nginx mailing list<br>
            <a href="mailto:nginx@nginx.org" moz-do-not-send="true">nginx@nginx.org</a><br>
            <a href="http://mailman.nginx.org/mailman/listinfo/nginx"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Steve Holdoway BSc(Hons) MIITP
<a class="moz-txt-link-freetext" href="https://www.greengecko.co.nz/">https://www.greengecko.co.nz/</a>
Linkedin: <a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/steveholdoway">https://www.linkedin.com/in/steveholdoway</a>
Skype: sholdowa</pre>
  </body>
</html>