# 404 page not found with whoami example

**URL:** <https://community.traefik.io/t/404-page-not-found-with-whoami-example/1770>\
**Category:** Traefik v2\
**Tags:** docker, docker-swarm\
**Created:** [September 20, 2019, 6:07pm UTC](https://community.traefik.io/t/404-page-not-found-with-whoami-example/1770 "2019-09-20T18:07:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![linucksrox](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@linucksrox](https://community.traefik.io/u/linucksrox)\
**Post date:** [September 20, 2019, 6:07pm UTC](https://community.traefik.io/t/404-page-not-found-with-whoami-example/1770/1 "2019-09-20T18:07:59Z")

</div>

I'm trying out the new 2.0 GA of Traefik but I'm having trouble getting the most basic of examples working. After reading the documentation and trying different things out for several hours, now I'm here asking for some guidance. I can access the dashboard and raw api info, and I see the whoami router in the dashboard. But when I go to whoami.development.local, I just get 404 page not found. What am I missing?

`traefik.yml` deployed using

```auto
docker stack deploy traefik -c traefik.yml

```

```auto
version: '3.7'

services:

  traefik:
    image: traefik:v2.0
    command:
      - "--log.level=DEBUG"
      - "--log.filepath=/traefik.log"
      - "--log.format=json"
      - "--api=true"
      - "--api.dashboard=true"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=true"
      - "--entrypoints.http.address=:80"
      - "--entrypoints.https.address=:443"
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik-public"
      - "traefik.http.routers.traefik.rule=Host(`traefik.development.local`)"
      - "traefik.http.routers.traefik.entrypoints=https"
      - "traefik.http.routers.traefik.service=api@internal"
      - "traefik.http.routers.traefikloadbalancer.server.port=8080"
    networks:
      - traefik-public
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
# - ./traefik.yml:/etc/traefik/traefik.yml
      - ./ssl:/etc/traefik/ssl
      - ./logs/traefik.log:/traefik.log
    ports:
      - "80:80"
      - "8080:8080"
      - "443:443"
    deploy:
      placement:
        constraints:
          - node.role == manager
      update_config:
        order: start-first # get new container running first before removing old, for less downtime
      rollback_config:
        order: start-first # get new container running first before removing old, for less downtime
      restart_policy:
        condition: any

networks:

  traefik-public:
    driver: overlay
    name: traefik-public

```

`whoami.yml` deployed using

```auto
docker stack deploy whoami -c whoami.yml

```

```auto
version: '3.7'

services:
  whoami:
    image: containous/whoami
    networks:
      - traefik-public
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik-public"
        - "traefik.http.routers.whoami.entrypoints=http"
        - "traefik.http.routers.whoami.rule=Host(`whoami.development.local`)"

networks:
  traefik-public:
    external: true
    name: traefik-public

```

---

<div class="post-metadata">

**Author:** ![zespri](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zespri/32/310_2.png) [@zespri](https://community.traefik.io/u/zespri)\
**Post date:** [September 23, 2019, 3:24am UTC](https://community.traefik.io/t/404-page-not-found-with-whoami-example/1770/2 "2019-09-23T03:24:09Z")

</div>

Hello, linucksrox,

To start with you do not seem to enable swarm mode for traefik in your configuration.

Also did you try looking at the log file? I used your configuration, added enabling of swarm mode, and had a glance in the log and I got a lot of records similar to

```auto
{"container":"whoami_whoami-asdum4ygd2b67wevs4b3dcoe1","level":"error","msg":"port is missing","providerName":"docker","time":"2019-09-23T03:12:08Z"}

```

Which indicates that traefik does not know to what port to route your requests. I then looked up the swarm example in the documentation, and bingo, it has an explicit line specifying the port number. Once I added that (modifying it to be in line with the rest of your example), lo and behold I got a correct response from whoami instead of the 404.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![linucksrox](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@linucksrox](https://community.traefik.io/u/linucksrox)\
**Post date:** [September 23, 2019, 6:36pm UTC](https://community.traefik.io/t/404-page-not-found-with-whoami-example/1770/3 "2019-09-23T18:36:13Z")

</div>

Thanks @zespri! That was it, I didn't enable swarm mode and I needed to specify the port for the service. It's working how I want now!
