We are running a multinode application on different ports on a single server. We are trying to use nginx as a reverse proxy to route requests to the different applications, depending on the match of a string in the request URI.
We are using the
location directive to match that string and route accordingly. If we return some value matching the strings in the location directive, it works fine. But as soon it is used in
proxy_pass we only see a 402 error. What are we doing wrong?
listen 443 ssl;
listen [::]:443 ssl;
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload; always';
location ~ 3000
# proxy_pass https://127.0.0.1:3000;
location ~ 3001
# proxy_pass https://127.0.0.1:3001;