<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Not inside the stream it won't... you'll need the map to at least
      be inside http and probably server.<br>
    </p>
    <div class="moz-signature">
      <table
style="color:rgb(51,51,51);border-collapse:collapse;font-size:12px;font-family:Arial,Helvetica,sans-serif;background-color:rgb(255,255,255);">
        <tbody>
          <tr>
            <td style="border-bottom: 1px solid
              rgb(231,100,45);padding:6px;text-align:center;"><a
                href="rosettahealth.com" style="text-decoration:none
                !important;" target="_blank"><img title="RosettaHealth"
src="http://static1.squarespace.com/static/55f6ddabe4b0864ffa14f418/t/566755e4841aba1728154e4b/1449612772113/RosettaHealth_icon_48.png"
                  width="48" height="48" border="0"></a></td>
            <td style="border-bottom: 1px solid
              rgb(231,100,45);padding:6px;">
              <div
                style="display:block;font-weight:bold;font-size:14px;">Phillip
                Odam</div>
              <div style="display:block;">Principal Engineer,
                RosettaHealth</div>
              <div style="display:block;"><a href="rosettahealth.com"
                  style="text-decoration:none
                  !important;color:rgb(231,100,45)!important;"
                  target="_blank">rosettahealth.com</a></div>
            </td>
            <td style="border-bottom: 1px solid
              rgb(231,100,45);padding:6px 6px 6px 18px;">
              <div style="display:block;"><span style="color:
                  rgb(231,100,45);">e:</span> <span
                  style="text-decoration:none !important;"><a class="moz-txt-link-abbreviated" href="mailto:phillip.odam@rosettahealth.com">phillip.odam@rosettahealth.com</a></span></div>
              <div style="display:block;"><!--<span style="color: rgb(231,100,45);">m:</span> <span style="text-decoration:none !important;"></span>   --><span
                  style="color: rgb(231,100,45);">o:</span> <span
                  style="text-decoration:none !important;">202.350.4343</span></div>
              <div style="display:block;"><span style="color:
                  rgb(231,100,45);">a:</span> 2 Wisconsin Circle, Chevy
                Chase, MD</div>
            </td>
          </tr>
          <tr>
            <td style="padding:6px;"><a
                href="https://twitter.com/rosettahealth"
                style="text-decoration:none;" target="_blank"><img
                  title="twitter"
src="http://static1.squarespace.com/static/55f6ddabe4b0864ffa14f418/t/5669a86d69492e7282c668ef/1449764973809/flaticon_twitter_16_square_gray.png"
style="width:16px;height:16px;border:none;text-decoration:none;"></a> <a
                href="https://www.facebook.com/rosettahealth"
                style="text-decoration:none;" target="_blank"><img
                  title="facebook"
src="http://static1.squarespace.com/static/55f6ddabe4b0864ffa14f418/t/5669a86369492e7282c6685b/1449764963520/flaticon_facebook_16_square_gray.png"
style="width:16px;height:16px;border:none;text-decoration:none;"></a> <a
                href="https://www.instagram.com/rosettahealth"
                style="text-decoration:none;" target="_blank"><img
                  title="Instagram"
src="http://static1.squarespace.com/static/55f6ddabe4b0864ffa14f418/t/5669a88769492e7282c66a5a/1449764999304/flaticon_instagram_16_square_gray.png"
style="width:16px;height:16px;border:none;text-decoration:none;"></a> <a
                href="https://www.linkedin.com/company/nitor-group"
                style="text-decoration:none;" target="_blank"><img
                  title="linkedin"
src="http://static1.squarespace.com/static/55f6ddabe4b0864ffa14f418/t/5669a87869492e7282c66977/1449764984560/flaticon_linkedin_16_square_gray.png"
style="width:16px;height:16px;border:none;text-decoration:none;"></a></td>
            <td colspan="2" style="padding:6px;"><a
                href="http://www.rosettahealth.com"
style="color:rgb(51,51,51);font-weight:bold;font-style:italic;text-decoration:none
                !important;" target="_blank">Connecting a Whole World of
                Healthcare</a></td>
          </tr>
        </tbody>
      </table>
    </div>
    <div class="moz-cite-prefix">On 8/26/19 10:05 PM, Louis Garcia
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFiZx5y87_XNrmr60RU==DNy4bdsea1+3txszF47X5e1DOVcFg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Does not work. <br>
        </div>
        <div><br>
        </div>
        <div>stream {<br>
                  map $host $name {<br>
                                              plex.montclaire.lan app1;<br>
                                             
          transmission.montclaire.lan app2;<br>
                                              default default;<br>
                                             }<br>
                  upstream app1 {<br>
                                 server <a
            href="http://127.0.0.1:32400" target="_blank"
            moz-do-not-send="true">127.0.0.1:32400</a> max_fails=3
          fail_timeout=10s;<br>
                                }</div>
        <div>        upstream app2 {<br>
                                 server <a href="http://127.0.0.1:9091"
            target="_blank" moz-do-not-send="true">127.0.0.1:9091</a>
          max_fails=3 fail_timeout=10s;<br>
                                }</div>
        <div>        server {</div>
        <div>                listen <a href="http://172.16.0.5:80"
            target="_blank" moz-do-not-send="true">172.16.0.5:80</a>;<br>
        </div>
        <div>                listen <a href="http://172.16.0.5:443"
            target="_blank" moz-do-not-send="true">172.16.0.5:443</a>;<br>
                          proxy_pass $name;<br>
                          ssl_preread on;<br>
                         }<br>
                 }</div>
        <div><br>
        </div>
        <div>nginx[31436]: nginx: [emerg] unknown "host" variable<br>
          nginx[31436]: nginx: configuration file /etc/nginx/nginx.conf
          test failed<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Aug 26, 2019 at 9:06
          PM Phillip Odam <<a
            href="mailto:phillip.odam@nitorgroup.com"
            moz-do-not-send="true">phillip.odam@nitorgroup.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF">
            <p>Hi Louis</p>
            <p>The variable I think you're looking for is <span
style="color:rgb(0,0,0);font-family:monospace;font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">$host
                - </span><span
style="color:rgb(0,0,0);font-family:monospace;font-size:medium;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><a
href="http://nginx.org/en/docs/http/ngx_http_core_module.html#variables"
                  target="_blank" moz-do-not-send="true">http://nginx.org/en/docs/http/ngx_http_core_module.html#variables</a></span></p>
            <div class="gmail-m_-9012422345561227805moz-signature"><br>
            </div>
            <div class="gmail-m_-9012422345561227805moz-cite-prefix">On
              8/26/19 8:55 PM, Louis Garcia wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>I am able to use $ssl_preread_server_name to get
                  the server name. This is with https requests. Is there
                  a corresponding embedded variable for http requests? I
                  would like to setup streams to different backend
                  servers based on http requests. Example below works
                  for https but not http.</div>
                <div>Thanks.<br>
                </div>
                <div><br>
                </div>
                <div>stream {<br>
                          map $ssl_preread_server_name $name {<br>
                                                             
                  plex.montclaire.lan app1;<br>
                                                             
                  transmission.montclaire.lan app2;<br>
                                                              default
                  default;<br>
                                                             }<br>
                          upstream app1 {<br>
                                         server <a
                    href="http://127.0.0.1:32400" target="_blank"
                    moz-do-not-send="true">127.0.0.1:32400</a>
                  max_fails=3 fail_timeout=10s;<br>
                                        }</div>
                <div>        upstream app2 {<br>
                                         server <a
                    href="http://127.0.0.1:9091" target="_blank"
                    moz-do-not-send="true">127.0.0.1:9091</a>
                  max_fails=3 fail_timeout=10s;<br>
                                        }</div>
                <div>        server {</div>
                <div>                listen <a
                    href="http://172.16.0.5:80" target="_blank"
                    moz-do-not-send="true">172.16.0.5:80</a>;<br>
                </div>
                <div>                listen <a
                    href="http://172.16.0.5:443" target="_blank"
                    moz-do-not-send="true">172.16.0.5:443</a>;<br>
                                  proxy_pass $name;<br>
                                  ssl_preread on;<br>
                                 }<br>
                         }<br>
                  <br>
                </div>
              </div>
              <br>
              <fieldset
                class="gmail-m_-9012422345561227805mimeAttachmentHeader"></fieldset>
              <pre class="gmail-m_-9012422345561227805moz-quote-pre">_______________________________________________
nginx mailing list
<a class="gmail-m_-9012422345561227805moz-txt-link-abbreviated" href="mailto:nginx@nginx.org" target="_blank" moz-do-not-send="true">nginx@nginx.org</a>
<a class="gmail-m_-9012422345561227805moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank" moz-do-not-send="true">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
            </blockquote>
          </div>
          _______________________________________________<br>
          nginx mailing list<br>
          <a href="mailto:nginx@nginx.org" target="_blank"
            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/mailman/listinfo/nginx</a></blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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>
  </body>
</html>