Docker - Traefik - Wildcard Subdomain
Intro
I was wondering if you can have Wildcart Certs for certain Subdomain. Idea is to provide a Service with “myservice.auth.your.domain” which automatically requests Authentication, while the same Service “myservice.whitelist.your.domain” is reachable through some Whitelisted IP only.
As Traefik can Chain Middleware, but not implements some logic (If Whitelist -> ok, else do Basic Auth …), i have to build another solution.
let’s have a look
Prepare Folders
cd /your/traffic/rootfolder
mkdir -p config/dynamic
.env File
we need two variables, so let’s put them in the .env File