title: Nginx Config proxy_pass use variable 404
body: <pre><code>    location /sail/ {
          proxy_set_header Host sail.sf-pharma.com;
          proxy_set_header REMOTE_ADDR $remote_addr;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection &quot;upgrade&quot;;
          proxy_next_upstream http_500 http_502 http_503 error timeout;
          proxy_pass https://sail.sf-pharma.com/sail/;
      }
  </code></pre>
  <p><strong>Above this config Nginx is working well.</strong></p>
  <p><strong>But if I use variable like this. Then I get 404.</strong></p>
  <p>I Don't Know Why:</p>
  <pre><code>    location /sail/ {
          proxy_set_header Host sail.sf-pharma.com;
          proxy_set_header REMOTE_ADDR $remote_addr;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection &quot;upgrade&quot;;
          proxy_next_upstream http_500 http_502 http_503 error timeout;
          resolver 127.0.0.53;
          set $sailback sail.sf-pharma.com:443;
          proxy_pass https://$sailback/sail/;
      }
  </code></pre>