title: NGINX match multiple paths with proxy pass
body: <p>I'm trying to pass multiple locations to a proxy, though, I can simply not make it work. Can anybody point me in the right direction?</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>    location / {
              try_files $uri $uri/ /index.html =404
              gzip on;
      }
  
      location ~* ^/(login|callback|ph|ch|th) {
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_set_header Host $host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-Host $host;
              proxy_cache_bypass $http_upgrade;
  
              proxy_pass http://127.0.0.1:4002;
      }
  </code></pre>
  
  <p>As you probably can tell, I'm trying to pass </p>
  
  <ul>
  <li><p>/login</p></li>
  <li><p>/callback</p></li>
  <li><p>/ph</p></li>
  <li><p>/ch</p></li>
  <li><p>/th</p></li>
  </ul>
  
  <p>to localhost on port 4002, but it's not passing them?</p>
  
  <p><strong>EDIT:</strong> If it's of any help. I think my front-end it hijacking the path-location? Not sure though.</p>