For a simple prefix location, a trailing slash can decide whether the backend receives /api/users or /users. Choose the form that matches the backend's actual routes.
Backend routes include /api
Place this location inside the server block:
location /api/ {
proxy_pass http://127.0.0.1:3000;
}
A request for reaches the backend with that same path and query. There is no replacement URI after the upstream address.
