Custom error page middleware

Hi, All thanks for this wonderful product. Now I have been trying all the examples show in other threads at doing this and none of them are working for me. Currently my docker-compose file looks like

services:
  mes:
    image: adrianrudnik/maintenance-server
    networks:
      - traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.services.mes-ra.loadbalancer.server.port=80"
  ra:
    build: .
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.ra.rule=Host(`xxx`)"
      - "traefik.http.routers.ra.tls.certresolver=lets-encr"
      - "traefik.http.routers.ra.tls=true"
      - "traefik.http.routers.ra.entrypoints=websecure"
      - "traefik.http.services.ra.loadbalancer.healthcheck.interval=5s"
      - "traefik.http.services.ra.loadbalancer.healthcheck.timeout=3s"
      - "traefik.http.services.ra.loadbalancer.healthcheck.path=/health"
      - "traefik.http.middlewares.errorpage.errors.status=200-599"
      - "traefik.http.middlewares.errorpage.errors.service=mes-ra@docker"
      - "traefik.http.middlewares.errorpage.errors.query=/"
    restart: unless-stopped

And still no mater what when I get the normal page of the ra container. In the traifik dashboard I see the mes service named as

So I am unsure what is causing the middleware not to work

Welcome @DrDoom

You have defined the middleware but it is not attached to the router. Adding another label like this should do the trick.

- "traefik.http.routers.ra.middlewares=errorpage

You my friend are a legend! I must have missed that in the docs. Thankyou :slight_smile: