# Reverse proxy locally what I would be doing wrong?

**URL:** <https://community.traefik.io/t/reverse-proxy-locally-what-i-would-be-doing-wrong/4562>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [February 22, 2020, 5:30pm UTC](https://community.traefik.io/t/reverse-proxy-locally-what-i-would-be-doing-wrong/4562 "2020-02-22T17:30:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![betorobson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/betorobson/32/2081_2.png) [@betorobson](https://community.traefik.io/u/betorobson)\
**Post date:** [February 22, 2020, 5:30pm UTC](https://community.traefik.io/t/reverse-proxy-locally-what-i-would-be-doing-wrong/4562/1 "2020-02-22T17:30:04Z")

</div>

I am trying do configure my docker compose to use traefik as reverse proxy to my nodejs app.  
It is running locally at host `nodejsdeploy.betorobson` which I have add a entry at hosts file to point out my local machine. So far my nodejs works by its own on port 3000.

So, it is working when I load on browser URL [http://nodejsdeploy.betorobson:3000](http://nodejsdeploy.betorobson:3000)

My aim is to use traefik as reverse proxy on port 80.

Here is my docker compose which I am trying a few setups, you can see some comments lines which represent some of those frustrated setup that I have tried before.

Applying this compose setup, I can see the traefik dashboard running on port 8080, but when I try access the nodejs thought the port 80, it shows `404 page not found`

```auto
version: "3"

services:
  app:
    labels:
      # - "traefik.backend=app"
      - "traefik.port=3000"
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.frontend.rule=Host:nodejsdeploy.betorobson"
      # - "traefik.frontend.rule=Host:nodejsdeploy.betorobson"
      # - "traefik.docker.network=web"
      - "traefik.port=80"
    build: .
    ports:
      - "3000:3000"
    # networks:
    # - internal
    # - web
    command: yarn start

  reverse-proxy:
    image: traefik:latest
    # command: --api --docker.exposedbydefault=false
    # command: --api --api.insecure=true --docker.exposedbydefault=false --providers.docker

    # command: --api.insecure=true --providers.docker

    command:
     - --api.insecure=true
     - --providers.docker

    # command:
    # - --api
    # - --api.insecure=true
    # - --docker
    # # - --docker.swarmmode
    # - --docker.watch
    # # - --entrypoints=Name:http Address::80 Redirect.EntryPoint:https
    # # - --entrypoints=Name:https Address::443 TLS
    # # - --defaultentrypoints=http,https
    # # - --acme
    # # - --acme.email=jakub.hajek@cometari.com
    # # - --acme.storage=/certificates/acme.json
    # # - --acme.entryPoint=https
    # # - --acme.httpChallenge.entryPoint=http
    # # - --acme.onhostrule=true
    # # - --acme.acmelogging=true
    # # - --logLevel=INFO
    # # - --accessLog
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

  # whoami:
  # image: containous/whoami
  # labels:
  # - "traefik.http.routers.whoami.rule=Host(`nodejsdeploy.betorobson`)"

```

Docker file

```auto
FROM node:10-alpine

WORKDIR /usr/app
COPY package.json yarn.lock ./

RUN yarn

COPY . .

EXPOSE 3000
CMD ["yarn", "start"]

```

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [February 22, 2020, 7:01pm UTC](https://community.traefik.io/t/reverse-proxy-locally-what-i-would-be-doing-wrong/4562/2 "2020-02-22T19:01:39Z")

</div>

Hello,

you are using the Traefik v1 labels with Traefik v2, it's not possible.

Always use an explicit version instead of `latest`: ex `traefik:v2.1`, `traefik:v1.7`

- [https://docs.traefik.io/v2.1/routing/providers/docker/#routers](https://docs.traefik.io/v2.1/routing/providers/docker/#routers)
- [https://docs.traefik.io/v2.1/routing/providers/docker/#services](https://docs.traefik.io/v2.1/routing/providers/docker/#services)
