# Struggling to setup reverse proxy for a web app

**URL:** <https://community.traefik.io/t/struggling-to-setup-reverse-proxy-for-a-web-app/25958>\
**Category:** Traefik v3 (latest)\
**Tags:** file, docker\
**Created:** [January 12, 2025, 12:58pm UTC](https://community.traefik.io/t/struggling-to-setup-reverse-proxy-for-a-web-app/25958 "2025-01-12T12:58:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeekRhapsody](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@GeekRhapsody](https://community.traefik.io/u/GeekRhapsody)\
**Post date:** [January 12, 2025, 12:58pm UTC](https://community.traefik.io/t/struggling-to-setup-reverse-proxy-for-a-web-app/25958/1 "2025-01-12T12:58:16Z")

</div>

Hi. I would like to use Traefik to reverse proxy a few docker container web apps. But i cannot workout the correct setup. This is my current traefik.yaml file:

```auto
log:
  level: DEBUG

api:
  dashboard: true
  insecure: true

certificatesResolvers:
  letencrypt:
    acme:
      email: "claudio.filipe@outlook.com"
      storage: "/letsencrypt/acme.json"
      httpChallenge:
        entryPoint: web
      
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false

entryPoints:
  web:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
  websecure:
    address: ":443"

https:
  routers:
    books:
      entryPoints:
        - "websecure"
      rule: "Host('books.mydomain.com')"
      tls:
        certResolver: letencrypt
      service: books

services:
  books:
    loadBalancer:
      servers:
        - url: http://192.168.0.64:25600
    passHostHeader: true

```

192.168.0.64:25600 is the address of the docker container (running on the same server as traefik.

Running traefik with the above setup, trying to access [books.mydomain.com](http://books.mydomain.com) i first get a "connection not secure" error in firefox, because it's using traefix's internal cert and not letsencrypt, and if i choose to proceed anyways i get a 404 error. If i browse to 192.168.0.64:25600 the web app is accessible.

Any advice is most appreciated

---

<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:** [January 12, 2025, 2:06pm UTC](https://community.traefik.io/t/struggling-to-setup-reverse-proxy-for-a-web-app/25958/2 "2025-01-12T14:06:40Z")

</div>

Traefik http `routers` and `services` are dynamic config, they need to be placed in a separate dynamic config file or in service/container labels, then loaded via `providers.file` or `providers.docker` in static config ([doc](https://doc.traefik.io/traefik/getting-started/configuration-overview/)).
