# Https always responds 404 with docker provider

**URL:** <https://community.traefik.io/t/https-always-responds-404-with-docker-provider/2796>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [November 5, 2019, 11:30am UTC](https://community.traefik.io/t/https-always-responds-404-with-docker-provider/2796 "2019-11-05T11:30:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emcellsoft](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@emcellsoft](https://community.traefik.io/u/emcellsoft)\
**Post date:** [November 5, 2019, 11:30am UTC](https://community.traefik.io/t/https-always-responds-404-with-docker-provider/2796/1 "2019-11-05T11:30:19Z")

</div>

I want to set up a traefik instance with docker provider, tls and user defined certificate.

Here is my configuration:

/etc/traefik.toml

```auto
## traefik.toml
defaultEntryPoints = ["http", "https"]

[entryPoints]
  [entryPoints.web]
    address = ":80"

  [entryPoints.web-secure]
    address = ":443"

[providers.docker]
  exposedByDefault = false
[providers.file]
  filename = "/etc/traefik.config.toml"

[accessLog]

[api]
  insecure = true

```

/etc/traefik.config.toml

```auto
[tls.stores]
  [tls.stores.default]

[[tls.certificates]]
  certFile = "/etc/ssl/private/varmeco.de.crt"
  keyFile = "/etc/ssl/private/varmeco.de.key"

```

docker-compose.yml of application:

```auto
version: '3'
services:
  frontend:
    image: docker-registry.varmeco.de:5000/vms-frontend:master
    restart: always
    labels:
      - traefik.enable=true
      - treafik.http.routers.vms.tls=true
      - traefik.http.routers.vms.rule=Host(`vms.varmeco.de`)
      - traefik.http.routers.vms.entrypoints=web,web-secure
      - traefik.docker.network=web
    networks:
      - web
      - default
networks:
  web:
    external:
      name: web

```

docker-compose.yml of traefik

```auto
version: "3.3"

services:
  traefik:
    image: "traefik:v2.0"
    container_name: "traefik"
    networks:
      - web
      - default
    ports:
      - "80:80"
      - "8080:8080"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "/etc/traefik.toml:/etc/traefik/traefik.toml"
      - "/etc/traefik.config.toml:/etc/traefik.config.toml"
      - "/etc/ssl/private:/etc/ssl/private"
    restart: always
networks:
  web:
    external:
      name: web

```

Everything works fine when using http. It's serving my applications html files.

```auto
curl http://vms.varmeco.de

```

However when I'm using https I just get "404 page not found"

```auto
> curl https://vms.varmeco.de
404 page not found

```

I've also recoginzed that the requests to https are not looged in the access log.  
Any ideas what I'm doing wrong?

---

<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:** [November 5, 2019, 11:57am UTC](https://community.traefik.io/t/https-always-responds-404-with-docker-provider/2796/2 "2019-11-05T11:57:32Z")

</div>

Hello,

`/etc/traefik.toml`:

```auto
[entryPoints]
  [entryPoints.web]
    address = ":80"

  [entryPoints.web-secure]
    address = ":443"

[providers.docker]
  exposedByDefault = false
[providers.file]
  filename = "/etc/traefik.config.toml"

[accessLog]

[api]
  insecure = true

```

`/etc/traefik.config.toml`:

```auto
[[tls.certificates]]
  certFile = "/etc/ssl/private/varmeco.de.crt"
  keyFile = "/etc/ssl/private/varmeco.de.key"

```

docker-compose.yml of application:

```yaml
version: '3'
services:
  frontend:
    image: docker-registry.varmeco.de:5000/vms-frontend:master
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.vms.tls=true
      - traefik.http.routers.vms.rule=Host(`vms.varmeco.de`)
      - traefik.http.routers.vms.entrypoints=web-secure
      - traefik.docker.network=web
    networks:
      - web
      - default
networks:
  web:
    external:
      name: web

```

docker-compose.yml of traefik

```yaml
version: "3.3"

services:
  traefik:
    image: "traefik:v2.0"
    container_name: "traefik"
    networks:
      - web
      - default
    ports:
      - "80:80"
      - "8080:8080"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "/etc/traefik.toml:/etc/traefik/traefik.toml"
      - "/etc/traefik.config.toml:/etc/traefik.config.toml"
      - "/etc/ssl/private:/etc/ssl/private"
    restart: always
    labels:
      - traefik.enable=true

      # global redirect HTTPS
      - "traefik.http.routers.catchall.rule=HostRegexp(`{any:.+}`)"
      - "traefik.http.routers.catchall.entryPoints=web"
      - "traefik.http.routers.catchall.middlewares=tohttps"

      # redirect HTTPS
      - "traefik.http.middlewares.tohttps.redirectScheme.scheme=https"
networks:
  web:
    external:
      name: web

```

---

<div class="post-metadata">

**Author:** ![emcellsoft](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@emcellsoft](https://community.traefik.io/u/emcellsoft)\
**Post date:** [November 5, 2019, 12:55pm UTC](https://community.traefik.io/t/https-always-responds-404-with-docker-provider/2796/3 "2019-11-05T12:55:41Z")

</div>

With this configuration I get the 404 on both http and https.

---

<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:** [November 5, 2019, 11:57pm UTC](https://community.traefik.io/t/https-always-responds-404-with-docker-provider/2796/4 "2019-11-05T23:57:38Z")

</div>

Two more fixes. Add label `- traefik.enable=true` to the docker-compose.yml of traefik and change `treafik.http.routers.vms.tls=true` to `traefik.http.routers.vms.tls=true` in the docker-compose.yml of application.
