Create a reverse proxy for two ports

At this point I think you need to update some configuration on your upstream server such that it understands it’s meant to run in a subpath.

Please read this wiki written by @Whitestrake, I think it will illustrate the issues you’re having.