[frontends]
[frontends.domain]
backend = "domain"
passHostHeader = true
[frontends.domain.routes.route_1]
rule = "Host: app.domain.cz"
[frontends.domain.routes.route_2]
rule = "Host: test.domain.cz"
[frontends.domain.routes.route_3]
rule = "Host: demo.domain.cz"
[frontends.domain.routes.route_4]
rule = "Host: stage.domain.cz"
[frontends.domain.routes.route_5]
rule = "Host: dev.domain.cz"
But it returns always 404. I
[frontends]
[frontends.domain]
backend = "domain"
passHostHeader = true
[frontends.domain.routes.route1]
rule = "Host: app.domain.cz,test.domain.cz,demo.domain.cz,stage.domain.cz,dev.domain.cz"
This works like a charm.
Am I wrong? I've thought that you can use more then 1 route. Thanks for an advice.
According to the documentation:
https://docs.traefik.io/basics/#frontends
Stacking multiple routes as in your first example means that ALL rules must be matched. In your second example, the rules are evaluated as an OR.
This is expected behaviour.
@dtomcej Why config key is routes
? Why not just route
?
Is AND really used more than OR in routes
? Seems like @f3l1x's first example is more intuitive
Most helpful comment
@dtomcej Why config key is
routes
? Why not justroute
?