title: How can I set Host as $upstream_addr in Nginx
body: <p>I have the following config below on Nginx.conf</p>
  
  <pre><code>&lt;b&gt;
  http {
      log_format my_upstream '$remote_addr [$time_local] "$request" $status'
          '"$upstream_addr" $upstream_response_time $upstream_http_etag $host $http_host';
      access_log /var/log/nginx/upstream.log my_upstream;
  
  upstream myapp{
           ip_hash;
           server x.x.x.174:8001;
           server x.x.x.96:8001;
       }
  
      server {
       listen 9000;
       #websocket
       location /jms {
           proxy_pass http://myapp/jms;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "Upgrade";
           proxy_set_header Host $upstream_addr;
       }
  
       location / {
          proxy_pass http://myapp;
       }
       }
  }
  &lt;/b&gt;
  </code></pre>
  
  <p>I tried setting the Host to $upstream_addr, but unfortunately, I'm receiving null in the request.
  Could anyone please help me in setting up the Host as $upstream_addr.
  Thanks,
  Bhaskar.</p>