I have a reverse proxy setup using traefik. It's great!
I am trying to figure how to configure it such that when someone goes to HOSTNAME
or www.HOSTNAME
, that I can have it default route to some container/subdomain of my choosing. Assume valid DNS records.
I have a config toml file here. I then launch a bunch of containers, which the docker backend watches & picks up. For example,
static:
image: myrepo/static
volumes:
- /www/static:/www/static
depends_on:
- traefik
labels:
- "traefik.backend=static"
- "traefik.frontend.rule=Host:static.$HOSTNAME"
Browsing to static.HOSTNAME
works right now. Yahoo! But suppose I want a browse to HOSTNAME
to also serve static.HOSTNAME
.
Any tips would be great! Thanks.