<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">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">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">172.16.0.5:80</a>;<br></div><div>                listen <a href="http://172.16.0.5:443">172.16.0.5:443</a>;<br>                proxy_pass $name;<br>                ssl_preread on;<br>               }<br>       }<br><br></div></div>