Closed
Description
Hello, I have multiple domains setup to one backend.
I'm trying to get multiple host headers to work using docker labels but no luck.
Here is what I'm trying:
labels:
- traefik.backend=test
- traefik.frontend.rule=Host:example.com.com
- traefik.port=80
Attempted this below but it only uses example2.com and not example.com.
labels:
- traefik.backend=test
- traefik.frontend.rule=Host:example.com.com
- traefik.frontend.rule=Host:example2.com.com
- traefik.port=80
Any ideas on how I can get this working?
Thanks
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
emilevauge commentedon Sep 21, 2016
@dky The documentation shows that you can use
traefik.frontend.rule=example.com,example2.com
;)dky commentedon Sep 21, 2016
@emilevauge, Thanks, I'll retry that, I think I gave that a shot too.
dky commentedon Sep 21, 2016
@emilevague, thanks, everything is working as planned. I'll dig harder throught he docs next time.
ghost commentedon Nov 20, 2017
Hello @emilevauge ,
doing it like
traefik.frontend.rule=example.com,example2.com
seems to be bad for automated parsing, and rather hard to read.Can it be done like
traefik.frontend.rule1=example.com
traefik.frontend.rule2=example2.com
?
Imagine that I have a hundred of hosts in
traefik.frontend.rule
, and several docker clusters with same hundred in each. And then I need to move one host from one cluster to another. Won't be funny if that hostname will be in one biiiig line with hosts.ldez commentedon Nov 20, 2017
Thanks for your interest in Traefik 😃
This issue is closed. Please discuss this in :
jdahlin commentedon Dec 7, 2017
The documentation is not particularly clear here, is it:
OR
Examples would be helpful.
Just my two cents.
linanw commentedon Dec 23, 2017
You may use:
OR
Careful the separator
;
or,
nicklayb commentedon Mar 19, 2018
Y'all having different version. Sometime you have
traefik.frontend.rule1=Host:example.com,example2.com
traefik.frontend.rule1traefik.frontend.rule=example.com,example2.com
without the Host:traefik.frontend.rule=Host:example.com,example2.com
with the Host: but with rule instead of rule1.Is it
.rule
or.rule1
?With or without
Host:
?ldez commentedon Mar 19, 2018
Thanks for your interest in Traefik 😃
This issue is closed. Please discuss this in the Traefik community Slack
https://docs.traefik.io/v1.7/configuration/backends/docker/#on-containers
Nuxij commentedon Jun 8, 2018
Why restrict us to Slack :( I'd also love to see the multiple label thing become possible. I don't mind if we do it like the 'route' configuration examples:
traefik.frontend.rule.alpha=Host....
or just
grimmy commentedon Aug 8, 2018
gentunian commentedon Feb 7, 2019
I agree with following issues in github, or at least in another slack channel. Slack channel is like talking to the wall, you get no attention and everyone is asking its own question/issue.
I'm interested in this discussion, came here today. Imagine find this topic in slack.
Commenting this may be marked as offtopic like @grimmy , but as for now, it seems that documentation has changed and it's not in the doc link shared by @emilevauge :
ldez commentedon Feb 7, 2019
https://docs.traefik.io/v1.7/basics/#matchers
sgohl commentedon Mar 15, 2019
https://docs.traefik.io/v1.7/basics/#matchers 404
Problem still remains. its actually unclear how to write multiple different domains so that Traefik will not handle another domain as SAN
gentunian commentedon Mar 18, 2019
@Port22 404 error is gone.
kooskaspers commentedon Mar 20, 2019
This works fine here:
tried this syntax already?
sgohl commentedon Mar 21, 2019
Yes, but I have to say that I am using two hosts while the first public domain (like swarm.example.com) must have letsencrypt-acme, and the second is an intranet-domain (like swarm.intranet.lan) with self-made CA certificate, which is setup in the traefik.toml