Hello,
today I wanted to replace my Nginx Proxy Manager with Traefik.
It seems I got it working that traefik fetches a valid wildcard domain for my domain, but I am getting a 404 Error when trying to reach one of my containers.
I feel like its a simple error that I am just unable to recognize.
SOLVED: As I thought it was a simple (and dumb) error:
I forgot to replace the router name in the values I used for wallos. Now it works.
Appreciate any help very much, thank you. Config files following:
traefik.yml:
Summary
global:
checkNewVersion: true
sendAnonymousUsage: false
log:
level: DEBUG
accesslog: {}
#tracing: {}
api:
dashboard: true
insecure: true
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
https:
address: ":443"
serversTransport:
insecureSkipVerify: true
providers:
docker:
exposedByDefault: false
endpoint: "unix:///var/run/docker.sock"
certificatesResolvers:
ionos:
acme:
email: staging_blooming239@zrtmx.com
storage: /certs/acme.json
httpChallenge:
# used during the challenge
entryPoint: http
dnsChallenge:
provider: ionos
resolvers:
- "ns1092.ui-dns.de"
- "ns1092.ui-dns.com"
- "ns1092.ui-dns.org"
- "ns1092.ui-dns.biz"
traefik docker compose:
Summary
services:
traefik:
image: traefik:v3.3
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
# Enables the web UI and tells Traefik to listen to docker
command: --api.insecure=true --providers.docker
networks:
- traefik
environment:
- TZ=Europe/Berlin
- IONOS_API_KEY=$IONOS_API_KEY
ports:
- 80:80 # HTTP entryPoints
- 443:443 # HTTPS entryPoints
- 8080:8080 # Dashbaord WebGui
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /docker/traefik/traefik.yml:/etc/traefik/traefik.yml:ro
- /docker/traefik/certs:/certs:rw
labels:
# Traefik
traefik.enable: true
traefik.http.routers.traefik.rule: Host(`traefik.my-domain.com`)
traefik.http.routers.traefik.entrypoints: https
traefik.http.routers.traefik-secure.tls: true
traefik.http.routers.traefik-secure.tls.certresolver: ionos
traefik.http.routers.traefik-secure.tls.domains[0].sans: '*.my-domain.com'
networks:
traefik:
external: true
Wallos is a relatively simple subscription tracker that Im using to test traefik
wallos docker-compose:
Summary
services:
wallos:
container_name: wallos
image: bellamy/wallos:v2.45.0
ports:
- "8282:80/tcp"
networks:
- traefik
environment:
TZ: 'Europe/Berlin'
# Volumes store your data between container upgrades
volumes:
- /docker/wallos/db:/var/www/html/db
- /docker/wallos/logos:/var/www/html/images/uploads/logos
restart: unless-stopped
labels:
# Traefik
- "traefik.enable=true"
- "traefik.http.routers.wallos.rule=Host(`wallos.my-domain.com`)"
- "traefik.http.routers.wallos.entrypoints=https"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=ionos"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=wallos.my-domain.com"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.my-domain.com"
networks:
traefik:
external: true
Wallos uses the normal labels format because I was trying out whether me using the other format (used in the traefik compose) was maybe messing with my config.
Trying to reach http://wallos.my-domain.com redirects me to https and says: "404 page not found".
The browser shows the connection is secure with a valid cert using *.my-domain.com
So it seems the cert is fine but something isnt right with the routing. Accessing wallos through 10.0.50.5:8282 works. My Network uses a pihole that has a local dns record to redirect wallos.my-server.com to my 10.0.50.5.
Traefik logs in reply because of character limit
I hope someone might see what the issue is here, let me know if I can provide any further information