Load Balancer Path - Map to / on Container

What I’m looking to do:

Create a Load Balancer for a service that maps like this:

example.com/app to / on targeted service

The “/app” gets passed through to the service using these settings:

host: example.com
path: /app
target: targeted service
port: exposed port

Thanks.

You can do this with custom haproxy config, but it will not really work for many applications.

Thanks Vincent. Do you know if Traefik would be a more effective solution to the problem, or is this just the nature of port mapping?

It has nothing to do with the software that’s rewriting the request…

The problem is you’re stripping off part of the path, and that information is needed for many applications to generate URLs that need to come back around and talk to itself.

Thank you. That’s helpful.