Hello,
I'm trying to reach a whoami container under https on my local computer
To do so I've added those line to /etc/hosts
127.0.0.1 dummy.org
127.0.0.1 traefik.dummy.org
127.0.0.1 api.dummy.org
As recommended by lets encrypt I've used minica in order to generate a certificate
I've generated the certificate with ./minica --domains 'dummy.org,traefik.dummy.org,api.dummy.org
docker-compose.yml
services:
traefik:
image: traefik:v3.0
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/etc/traefik/traefik.yml
- ./conf.d/:/etc/traefik/conf.d/
- ${PWD:-.}/certs/:/certs/
whoami:
image: "traefik/whoami"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.entrypoints=dummy,dummy_unsecure"
- "traefik.http.routers.whoami.rule=Host(`api.dummy.org`)"
traefik.yml
## Static Configuration
log:
level: DEBUG
# print access log
accessLog: {}
# enable dashboard on 8080 with auth
api:
# insecure: true
dashboard: true
entryPoints:
dummy_unsecure:
address: ":80"
http:
redirections:
entryPoint:
to: dummy
scheme: https
dummy:
address: ":443"
asDefault: true
http:
tls:
domains:
- main: dummy.org
sans:
- api.dummy.org
providers:
docker: {}
file:
directory: /etc/traefik/conf.d/
watch: true
Here is the dynamic configuration I've written in the conf.d
directory
dynamic-config.yml
## Dynamic configuration
tls:
certificates:
- certFile: /certs/cert.pem
keyFile: /certs/key.pem
stores:
- default
http:
routers:
dashboard:
rule: Host(`traefik.dummy.org`)
service: api@internal
I can access in https to treafik.dummy.org
When I try to reach the api.dummy.org in http its working fine
SOLVED - NOT ANYMORE: When I try to reach the api.dummy.org in https I'm meeting a 404
Do you have a clue of what I'm missing?