I seem to be having an issue with my rules. I can get all of them working about 90% of the time which seems really odd.
Here is one example
Traefik dashboard is accessible from 2 of my computers only -- I have 3 others and I get a 404 error. The same IP address is resolved for the same domain, I am using the same browser, same version, same OS even. This makes no sense to me at all.
So my question is, is there a way to turn on any sort of logging that shows a trace of what happens when a request comes in to traeifk and how the rules are evaluated?
Here is my compose file
version: "3.7"
services:
traefik:
container_name: traefik
image: traefik:latest
env_file:
- .env
- .env.traefik
volumes:
- /mnt/AppData/network/traefik/certs:/certs:rw
- /mnt/AppData/network/traefik/logs:/logs:rw
- /mnt/AppData/network/traefik/letsencrypt:/letsencrypt:rw
- /mnt/AppData/network/traefik/config:/etc/traefik:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- public
- web
- data
- media
- monitoring
- network
- logging
ports:
- 80:80
- 443:443
security_opt:
- no-new-privileges:true
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik-api.entryPoints=web, websecure"
- "traefik.http.routers.traefik-api.rule=Host(`traefik.home.linux.docker.home.local`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.traefik-api.service=api@internal"
- "traefik.http.routers.traefik-api.tls=true"
restart: always
traefik-whoami:
container_name: traefik-whoami
image: containous/whoami:latest
env_file:
- .env
- .env.traefik-whoami
volumes:
- /mnt/AppData/network/traefik-whoami:/config:rw
networks:
- data
security_opt:
- no-new-privileges:true
labels:
- "traefik.enable=true"
- "traefik.docker.network=data"
# traefik-whoami: websecure
- "traefik.http.routers.traefik-whoami.entrypoints=websecure"
- "traefik.http.routers.traefik-whoami.service=traefik-whoami"
- "traefik.http.services.traefik-whoami.loadbalancer.server.port=80"
- "traefik.http.routers.traefik-whoami.priority=100"
- "traefik.http.routers.traefik-whoami.rule=Host(`traefik-whoami.home.linux.docker.home.local`)"
- "traefik.http.services.traefik-whoami.loadbalancer.server.scheme=http"
- "traefik.http.routers.traefik-whoami.tls=true"
restart: always
networks:
public:
external: true
web:
external: true
data:
external: true
media:
external: true
monitoring:
external: true
network:
external: true
logging:
external: true
Here is my traefik.yml file
global:
checkNewVersion: true
sendAnonymousUsage: true
api:
#insecure: false
dashboard: true
#debug: false
log:
level: DEBUG
filePath: /logs/traefik.log
format: json
accessLog:
filePath: /logs/access.log
format: json
# bufferingSize: 42
serversTransport:
insecureSkipVerify: true
entryPoints:
# Stand Web Access
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443