Point to service on same machine at different port

Hi,
sorry cross post as I didn't know about this community.

I have a service( myapp ) running on a node at port 5678 . I'm running Traefik on the same node(e.g. myip ). How do I make Traefik route any requests to http://myip/myapp to the myapp service running at port 5678 ?

In the router that routes to that app, override the port to point at 5678 via tags, or just define the port in the loadbalancer:

Check out: https://docs.traefik.io/routing/services/

  • The example at the top - "Declaring an HTTP Service with Two Servers -- Using the File Provider"

Not sure how you're defining the router and service. If you paste that in, it should be easy to see what to modify.

1 Like