# Traefik v2 configuration does not work

**URL:** <https://community.traefik.io/t/traefik-v2-configuration-does-not-work/6075>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [May 15, 2020, 10:41pm UTC](https://community.traefik.io/t/traefik-v2-configuration-does-not-work/6075 "2020-05-15T22:41:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonndoe](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@jonndoe](https://community.traefik.io/u/jonndoe)\
**Post date:** [May 15, 2020, 10:41pm UTC](https://community.traefik.io/t/traefik-v2-configuration-does-not-work/6075/1 "2020-05-15T22:41:39Z")

</div>

I'm following some tutorial [link\_to\_tutorial](https://containo.us/blog/traefik-2-0-docker-101-fc2893944b9d/) about traefik 2.0 and docker, and I have docker-compose file which starts up two containers: traefik and my-app. The problem is when containers up and running, I am not able to browse to localhost:8082, as suggested by configuration, I always get "unable to connect" in browser.

docker-compose.yml :

```auto
version: "3.3"

services:
  traefik:
    image: "traefik:v2.0.1"
    command:
      - --entrypoints.web.address=:80
      - --providers.docker
      - --api.insecure
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  my-app:
    image: containous/whoami:v1.3.0
    command:
      # It tells whoami to start listening on 8082 instead of 80
      - --port=8082
    labels:
      - "traefik.http.routers.my-app.rule=Host(`whoami.docker.localhost`)"
      - "traefik.http.services.my-app.loadbalancer.server.port=8082"

```

However I am able to get localhost:8080 and traefik UI works well. As I understand all requests to "traefik" container normally should be redirected to "my-app":8082 container but it somehow fails. Help heeded.Thanks.

---

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [May 16, 2020, 10:28pm UTC](https://community.traefik.io/t/traefik-v2-configuration-does-not-work/6075/2 "2020-05-16T22:28:19Z")

</div>

> [@jonndoe](#):
>
> As I understand all requests to "traefik" container normally should be redirected to "my-app":8082 container but it somehow fails

Your router is defined as whoami.docker.localhost. That is the address you should be using to access my-app.
