# Traefik with Docker, shows 404

**URL:** https://community.traefik.io/t/traefik-with-docker-shows-404/27210
**Category:** Traefik v3 (latest)
**Tags:** docker
**Created:** [April 16, 2025, 6:32pm UTC](https://community.traefik.io/t/traefik-with-docker-shows-404/27210 "2025-04-16T18:32:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DevOps\_guy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/devops_guy/32/10291_2.png) [@DevOps\_guy](https://community.traefik.io/u/DevOps_guy)
#### Post date: [April 16, 2025, 6:32pm UTC](https://community.traefik.io/t/traefik-with-docker-shows-404/27210/1 "2025-04-16T18:32:53Z")

</div>

I've F5 load balancer in front of my environment, and it routes requests to the Docker host where Traefik is running on port (10.55.36.20:8080.) the domain name configured on the F5 is **`https://devospgyu.com`** , and it forwards traffic to the Traefik container (on port 8080).  
my problem is My problem is that access to [https://devospgyu.com/rabbitmq](https://devospgyu.com/rabbitmq) works fine but [https://devospgyu.com/document/api/healthcheck/kibana](https://devospgyu.com/document/api/healthcheck/kibana) 404 or [https://devospgyu.com/document/api/healthcheck/rabbitmq](https://devospgyu.com/document/api/healthcheck/rabbitmq) 404 and its redirect me to [https://devospgyu.com/](https://devospgyu.com/)

```auto
services:
  traefik:
    image: registry/library/traefik:v3.1
    container_name: traefik
    ports:
      - "8080:8080"   
    command:
      - "--entryPoints.web.address=:8080"
      - "--providers.docker=true"
      - "--providers.docker.exposedByDefault=false"
      # - "--entryPoints.websecure.address=:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped

  rabbitmq:
    image: registry/library/rabbitmq:3.12.5-management
    container_name: rabbitmq
    ports:
      - "5672:5672"
    environment:
      RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
      RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
      RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_VHOST}
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.rabbitmq.rule=Host(`devospgyu.com`) && PathPrefix(`/rabbitmq`)"
      - "traefik.http.routers.rabbitmq.entryPoints=web"
      - "traefik.http.services.rabbitmq.loadBalancer.server.port=15672"
      - "traefik.http.middlewares.rabbitmq-strip.stripprefix.prefixes=/rabbitmq"
      - "traefik.http.routers.rabbitmq.middlewares=rabbitmq-strip"
    healthcheck:
      test: ["CMD", "rabbitmq-diagnostics", "status"]
      interval: 30s
      timeout: 10s
      retries: 5
    restart: unless-stopped

  api:
    image: registry/poc/document-api:${VERSION}
    container_name: api
    depends_on:
      rabbitmq:
        condition: service_healthy
      elasticsearch:
        condition: service_healthy
    environment:
      FileStorage__WorkingDir: /mnt/data
      RabbitMq__Host: rabbitmq
      RabbitMq__User: ${RABBITMQ_USER}
      RabbitMq__Pass: ${RABBITMQ_PASSWORD}
      RabbitMq__VHost: ${RABBITMQ_VHOST}
     
    volumes:
      - ${CIFS_MOUNT}:/mnt/data
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.api.rule=Host(`devospgyu.com`) && PathPrefix(`/document`)"
      - "traefik.http.routers.api.entryPoints=web"
      - "traefik.http.services.api.loadBalancer.server.port=80"
      - "traefik.http.middlewares.api-strip.stripprefix.prefixes=/document"
      - "traefik.http.routers.api.middlewares=api-strip"
    healthcheck:
      test: >
        bash -c 'curl -sf http://localhost:80/api/healthcheck | grep -q "\"status\":\"Healthy\""'
      interval: 30s
      timeout: 5s
      retries: 3
    restart: unless-stopped

  kibana:
    image: registry/proxy/library/kibana:8.9.1
    container_name: ${hostname}-kibana
    environment:
      - ELASTIC_URL=http://elasticsearch:9200
      - XPACK_SECURITY_ENABLED=fals
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.kibana.rule=Host(`devospgyu.com`) && PathPrefix(`/kibana`)"
      - "traefik.http.routers.kibana.entrypoints=web"
      - "traefik.http.services.kibana.loadbalancer.server.port=5601"
      - "traefik.http.middlewares.kibana-strip.stripprefix.prefixes=/kibana"
      - "traefik.http.routers.kibana.middlewares=kibana-strip"
    depends_on:
      - elasticsearch

```

I've F5 load balancer in front of my environment, and it routes requests to the Docker host where Traefik is running. The domain name configured on the F5 is **`https://devospgyu.com`** , and it forwards traffic to the Traefik container (on port 8080).  
my problem is My problem is that access to [https://devospgyu.com/rabbitmq](https://devospgyu.com/rabbitmq) works fine but [https://devospgyu.com/document/api/healthcheck/](https://devospgyu.com/document/api/healthcheck/) return 404 also [https://devospgyu.com/document/api/healthcheck/kibana/](https://devospgyu.com/document/api/healthcheck/kibana/) 404

---

<div class="post-metadata">

### Author: ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)
#### Post date: [April 17, 2025, 5:19am UTC](https://community.traefik.io/t/traefik-with-docker-shows-404/27210/2 "2025-04-17T05:19:10Z")

</div>

`Host()` should not include a protocol:

> [@DevOps\_guy](#):
>
> `Host(`[https://devospgyu.com`](https://devospgyu.com%60)) `

Note that not every web application supports a custom path (`PathPrefix()` and `stripPrefix`), instead a sub-domain is best practice. It’s [discussed like here](https://community.traefik.io/t/docmost-pathprefix/27164/2) about every other week.
