Create a reverse proxy using Nginx with user specific routing and password authorization

Be careful with container hostnames since the proxy should see every container, but in some cases (for example when you use docker compose) different containers can have the same service name, so the same hostname as well. I don’t remember exactly how nginx-proxy generates the config file, but I am pretty sure it uses IP addresses to connect to the containers and uses a name for the nginx “upstream” only.

Nginx proxy also has a path based routing, but yes, you can use JS if you want to.