I have traefik set up with docker compose and it's all been working great, i wanted to move all my container to a new pc since the one it was set up on was starting to lack power and storage.
Unfortunately when i moved things over traefik started giving me the 404 page and i had taken everything down on my first server, so i tried to put it back up and i didnt get any answer when trying to load a page.
If i foward my firewall port directly to the service its all working so I feel like it is traefik that causes the problem but i can't see why, not in my config nor in the logs.
I will share my config in case you guys see something i did wrong, i suspect a typo since i did not make any change on my traefik config before the move, i only looked at it through vscode
traefik compose:
version: "3.3"
services:
traefik:
image: "traefik:latest"
container_name: "traefik"
restart: unless-stopped
environment:
- CF_API_EMAIL=my@email.com
- CF_API_KEY=[my-key]
networks:
- proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/etc/localtime:/etc/localtime:ro"
- "./conf/traefik.yml:/traefik.yml:ro"
- "./conf/config.yml:/config.yml:ro"
- "./conf/acme.json:/acme.json"
- "./logs:/logs"
labels:
traefik.enable: true
traefik.http.routers.dashboard.entrypoints: "web, websecure"
traefik.http.routers.dashboard.rule: "Host(`my.domain.tld`)"
traefik.http.routers.dashboard.tls: true
traefik.http.services.dashboard.loadbalancer.server.port: 8080
traefik.http.services.dashboard.loadbalancer.server.scheme: "http"
traefik.docker.network: "proxy"
networks:
proxy:
external: true
my static config (traefik.yml):
global:
checknewversion: true
sendanonymoususage: true
log:
level: DEBUG
accessLog:
filePath: /logs/access.log
fields:
defaultMode: keep
headers:
defaultMode: keep
names:
StartLocal: keep
StartUTC: drop
Duration: keep
ServiceName: keep
ServiceURL: keep
RequestLine: keep
OriginStatusLine: keep
DownstreamStatusLine: keep
ping: {}
api:
dashboard: true
insecure: true
debug: true
entryPoints:
web:
address: ":80"
http:
redirections:
entrypoint:
to: websecure
scheme: https
websecure:
address: ":443"
forwardedHeaders:
insecure: true
http:
tls:
certResolver: cloudflare
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: proxy
watch: true
file:
filename: /config.yml
certificatesResolvers:
cloudflare:
acme:
email: my@email.com
storage: acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
and I feel like the error is not into my dynamic config file but here it is anyway
my dynamic config file (config.yml):
http:
routers:
arthur:
entrypoints:
- "web"
- "websecure"
service: "router"
rule: Host(`routeur.domain.tld`)
tls:
certResolver: "cloudflare"
domains:
- main: "domain.tld"
sans: "*.domain.tld"
services:
router:
loadBalancer:
servers:
- url: https://192.168.1.1:443/
passHostHeader: true
I've got the access logs turned on but i don't get a new entry when i try to access something true port 80 or 443, the only time i get a new log line is when i access the dashboard through 8080.
I'm lost, not sure where is the mistake so i was hoping someone could help me find it. I'm at the point that i'm think about starting from scratch.
If there you need more info just ask me, i don't mind providing it.