0

So I want to use Nginx proxy_pass to reroute my urls, which may or may not have subpaths, to the same port.

For example, .../users should be redirected to http://127.0.0.1:8080/users, but, another url of the form .../users/foo/bar should also be redirected to http://127.0.0.1:8080/users/foo/bar.

I was able to achieve just the /users implementation, but as soon as I type /users/foo/bar, I get a 404 Not Found error.

So far my configuration looks like the following:

location ^~ /users {
    proxy_pass http://127.0.0.1:8080/users;
}

I have tried the various solutions from: nginx proxy pass subpaths not redirected

devb
  • 101
  • 1
  • 3

0 Answers0