Accessing service using IP and path prefixes only

Hi.

I'm having trouble setting up some services (using Docker Swarm) to be accessible using purely IP addresses and path prefixes. Let's use some common services to demonstrate the problem easier:
The stack:

  • Traefik 2.3.x
  • Grafana on port 3000
  • InfluxDB on port 8086

Intended access scheme:

  • 100.110.120.130/grafana
  • 100.110.120.130/influx

As I understand I would need to do at least the following to achieve this:

  • reroute port 80 to 3000 or 8086 (depending on the service)
  • define a prefix for each service
  • strip prefix when accessing it
  • I have no idea what's next

As an example, I concocted the following label set for influxdb:

   deploy:
       labels:
           - "traefik.enable=true"
           - "traefik.http.routers.influxdb.service=influxdb"
           - "traefik.http.routers.influxdb.entrypoints=web"
           - "traefik.http.routers.influxdb.rule=PathPrefix(`/influx`)"
           - "traefik.http.routers.influxdb.middlewares=influxStripPref"
           - "traefik.http.services.influxdb.loadbalancer.server.port=8086"
           - "traefik.http.middlewares.influxStripPref.stripprefix.prefixes=/influx"
           - "traefik.http.middlewares.influxStripPref.stripprefix.forceslash=false"

But it doesn't work. All I get is an empty page (not even a 404 page), so something gets rerouted but obviously the setup is incomplete.

Later it would be nice to redirect http to https first and then reroute from 443 to 8086, but I guess that's a different question (although I'm open to suggestions).

Could somebody please point me in the right direction? And before answering, please consider that domain names are out of the question, so influx.example.com is not a good solution at this moment.

Thanks for the help.