Hi,
I started using Traefik just today, after watching many hours of keynotes and everything related to Traefik, I have to admit it's a huge tech change from my old nginx reverse proxy !
I've successfully set up every subdomain redirect for every docker container I wanted to, but I'm struggling on making it work for external services, such as DSM (Synology Dashboard), running on my NAS.
docker-compose.yaml
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
ports:
- 80:80
- 443:443
- 38080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./DATA/traefik/letsencrypt:/letsencrypt
- ./DATA/traefik/traefik.toml:/traefik.toml
- ./DATA/traefik/conf.d/rules.toml:/etc/traefik/conf.d/rules.toml
networks:
- web
- internal
traefik.toml
[global]
sendAnonymousUsage = false
[log]
level = "DEBUG"
[providers]
[providers.docker]
endpoint = "unix:///var/run/docker.sock"
watch = true
exposedByDefault = true
swarmMode = false
[providers.file]
filename="/etc/traefik/conf.d/rules.toml"
watch=true
[api]
dashboard = true
debug = false
insecure = true
[entryPoints]
[entryPoints.insecure]
address = ":80"
[entryPoints.secure]
address = ":443"
[certificatesResolvers.myresolver.acme]
email="me@example.conf"
storage="/letsencrypt/acme.json"
[certificatesResolvers.myresolver.acme.dnschallenge]
provider="ovh"
rules.toml
[http]
[http.middlewares]
[http.middlewares.nas-redirect.redirectScheme]
scheme = "https"
[http.routers.nas-redirect]
entrypoints = ["insecure"]
rule = "Host(`dsm.domain.net`)"
middlewares = ["nas-redirect"]
service = "service_nas"
[http.routers.service_nas]
entrypoints = ["secure"]
rule = "Host(`dsm.domain.net`)"
service = "service_nas"
[http.routers.service_nas.tls]
certResolver = "myresolver"
[http.services]
[http.services.service_nas.loadbalancer]
[[http.services.service_nas.loadBalancer.servers]]
url = "http://192.168.1.22:5000"
Each request to dsm.domain.net gives me a warning on Chrome, with the Traefik default cert, and logs states that dsm.domain.net isn't recognized, serving default certificate.
I tried to follow everything, but I must be missing something obvious to you guys.
Thanks in advance for the provided help
Cheers !