How can I have a website on and have a seperate container on

Hi, pretty much, title. I'm currently doing this:

      - "traefik.http.routers.mci.rule=Host(``)"
      - "traefik.http.routers.mci.tls=true"
      - "traefik.http.routers.mci.priority=10"
      - "traefik.http.routers.mci.tls.certresolver=lets-encrypt"
      - "traefik.port=80"
      - "traefik.http.routers.mcib.rule=Host(``) && PathPrefix(`/api/`)"
      - "traefik.http.routers.mcib.tls=true"
      - "traefik.http.routers.mcib.priority=100"
      - "traefik.http.routers.mcib.tls.certresolver=lets-encrypt"
      - "traefik.port=80"

And currently, when I visit*, it shows me a 404 page from my frontend. However, I want that to be from the API. How would I do that?

In general it looks okay. You don’t need to set priority as the priority defaults to the rule length. Longer rule, more characters, higher priority.

Maybe compare to simple Traefik example.

Well, it doesn't work as expected for me. I don't want the frontend 404 but rather the API usage. So if I fetch, I just get a 404 back.

Enable access log in JSON format to see if the error comes from Traefik or your target service.

It's from my app. I get some HTML back.

If you are sure it’s from your app, then maybe it’s not configured for the domain name and expects a different one in the request. Or the path is wrong. You would need to check the logs of the app.