I've been selfhosting for a bit, but have never really gotten a solid understanding of Traefik.
What I'd like to do is have 3 machines, 1 as an "entry point" where Traefik forwards by domain to the two other machines. Ie I route to anything.domain1.com and the entry machine forwards to machine 1, anything.domain2.com forwards to machine 2.
Then on each machine have another instance of Traefik to manage the applications that machine hosts.
Is this even possible? Without using docker swarm?
Thanks.
4 Comments
dcatt@lemmy.dbzer0.com · 4 pts · 295d
Yup, easy, just add a config with router, host rule & service specification for each machine with their respective ip as destination.
https://doc.traefik.io/traefik/master/reference/routing-configuration/http/routing/router/
thelittleblackbird@lemmy.world · 3 pts · 295d
Yes, no problem with that
stratself@lemdro.id · 3 pts · 294d
It's entirely possible. If the 2 domains are different, you should look into SNI routing using the TCP router instead of HTTP. With the
tls.passthroughflag, encryption is kept intact until it reaches the second proxy.ironhydroxide@sh.itjust.works · 2 pts · 293d
Thank you! The sni routing and passthrough helped get me to the right pages and reading. I have a test setup running now and it's looking hopeful.