I now use the traefix + consul method as the gateway, and docker compose to start the relevant business container. The docker compose configuration of the business container is as follows:
From the above figure, you can see that the business container has been registered to the consul
traefik.http.routers.myrouter.rule=Host( www.xxoo.com ) && PathPrefix( / , /(.*)/ ) && Headers( hash , 7890 )
Here, I want to achieve the flow to this container when the domain name, path and header match
However, there is an error in the web interface of traefik. The error is as follows:
Service of docker compose service_tags are separated by commas, and the rule of traefik are also separated by commas, which leads to this error
Now I don't know how to configure it to meet the above requirements. I hope you can help me. Thank you
A PathPrefix rule / means that everything starting with / will be handled so the second element (/(.*)/) seems useless. In fact, you don't need a PathPrefix rule / to handle the domain, maybe I missed something.