# Nginx forward to traefik catchall

**URL:** <https://community.traefik.io/t/nginx-forward-to-traefik-catchall/7890>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [September 25, 2020, 4:07pm UTC](https://community.traefik.io/t/nginx-forward-to-traefik-catchall/7890 "2020-09-25T16:07:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iangregsondev](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/iangregsondev/32/1670_2.png) [@iangregsondev](https://community.traefik.io/u/iangregsondev)\
**Post date:** [September 25, 2020, 4:07pm UTC](https://community.traefik.io/t/nginx-forward-to-traefik-catchall/7890/1 "2020-09-25T16:07:47Z")

</div>

Hi, can anyone help ?  
I am trying to use traffic but its infront of a nginx proxy. So I decided to make traefik listen on endpoints 81 and 444.  
Then I wanted nginx to forward proxy requests to traefik to server..  
But traefik isn’t doing anything, maybe I have made a mistake 🙂 Very probably.  
here is my traefik

```auto
       --api.insecure=true,
        --api.dashboard=true,
        --providers.docker=true,
        --providers.docker.swarmMode=true,
        --providers.docker.exposedByDefault=false,
        --entryPoints.http.address=:81,
        --entryPoints.https.address=:444,
and ports are exposed 
    ports:
      - target: 81
        published: 81
        mode: host
      - target: 444
        published: 444
        mode: host   
      - target: 8080
        published: 8080
        mode: host  

```

Nothing seems to be working, although I have the treafik dashboard set on 8080: and that port published so i can see traefik running..  
I have a simple container that i know works as I am using it elsewhere and i have a host configured  
Canyone help, i know it must be something to do with nginx  
This is the nginx , i presume i am listening on 80 and forwarding to 81  
should work right ?

```auto
server {
    listen 80 default_server;
    server_name _;
    location / {
      proxy_pass http://127.0.0.1:81;
    }
}

```

So nginx is the one listening on 80,443 and if anything is unserved by it then i want it to forward to traefik. Is somebody doing something similar ?

---

<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:** [September 25, 2020, 4:14pm UTC](https://community.traefik.io/t/nginx-forward-to-traefik-catchall/7890/2 "2020-09-25T16:14:50Z")

</div>

Nginx is a container? If so 127.0.0.1 is the nginx container not traefik.

If they are on the same docker network then use the container name instead of 127.0.0.1

---

<div class="post-metadata">

**Author:** ![iangregsondev](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/iangregsondev/32/1670_2.png) [@iangregsondev](https://community.traefik.io/u/iangregsondev)\
**Post date:** [September 25, 2020, 4:26pm UTC](https://community.traefik.io/t/nginx-forward-to-traefik-catchall/7890/3 "2020-09-25T16:26:58Z")

</div>

Hi, thanks for the reply.

No, traefik is in a container.

Nginx is on the host machine...

---

<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:** [September 25, 2020, 5:10pm UTC](https://community.traefik.io/t/nginx-forward-to-traefik-catchall/7890/4 "2020-09-25T17:10:54Z")

</div>

So what errors are you getting.

What routers and service do you have configured in traefik ?
