See this article:
You’d be much better off using a subdomain for each service.
You can’t pass a path as part of the upstream address. If you need to rewrite the path, you need to use the rewrite directive to do that. (But again – just use subdomains)
rewrite