Multiple domains behind Traefik reddit / selfhosted ---------------------------------------------------------------------- pope_bacon · 2023-10-29 02:18 I am trying to find a way to have two separate domains associated with separate emails accessible through Traefik. I have done some research but cannot figure it put. I tried creating a TCP router to accomplish this but it does not work. Is there a better way to accomplish this? ---------------------------------------------------------------------- clintkev251 · 2023-10-29 02:30 >it does not work. Care to expand? "It does not work" doesn't really give us much info on what the actual issue you're facing is. Actual error messages, descriptions of the behavior, more information on the configuration that you tried, etc. would be more helpful. Traefik is perfectly happy to serve as many domains as you want to write rules to handle so likely there was some config issue ---------------------------------------------------------------------- pope_bacon · 2023-10-29 02:47 My apologies. It's been a long day. ​ Domain 1 is my primary domain for all my homelab stuff. This all works properly and is configured with wildcard certs through Traefik. Domain 2 is for a family member who wants to start a business but has asked me to manage it. Currently I downloaded a website template as a placeholder to view content on the site. I am using Unraid for my OS and domain 2 is on an instance of Nginx in unraid. ​ When I navigate to domain 2, I get a 418 error. This page isn’t workingIf the problem continues, contact the site owner. HTTP ERROR 418 I understand that I don't have everything configured properly. I'm just not sure how to make the connection happen. Everything I've researched isn't for unraid and I'm not exactly understanding how to make it happen. ---------------------------------------------------------------------- clintkev251 · 2023-10-29 03:04 Are you able to connect to the Nginx server directly? Do you see the same behavior when you use a rule that is a subdomain of your domain that you use for everything else? 418 is I'm a teapot, so that's uhhh, not that helpful for debugging, but does at least tell me that you have a config issue somewhere, and I don't think it has anything to do with your rules ---------------------------------------------------------------------- TerminalFoo · 2023-10-29 03:11 Uh...you're hosting a business website on Unraid at home? Or am I misunderstanding? ---------------------------------------------------------------------- pope_bacon · 2023-10-29 03:24 I can connect to the Nginx server via local IP but not the domain. My unraid domain:8002 resolves the template for the site. ---------------------------------------------------------------------- pope_bacon · 2023-10-29 03:25 That was a plan. It's not going to be a huge upkeep kind of site. It's for a dog sitting business. ---------------------------------------------------------------------- TerminalFoo · 2023-10-29 03:33 You can probably find a free host or something. Even if it's not huge upkeep, you are now responsible for making sure the site stays up. If you have to reboot Unraid, the site goes down. I wouldn't mix business with homelab or selfhosting at home. ---------------------------------------------------------------------- pope_bacon · 2023-10-29 03:35 That's a good point. Thank you. ---------------------------------------------------------------------- xstar97 · 2023-10-29 04:10 From your comments depending on how low maintaintance your other website is... you can probably host it via cloudflare pages and connect your domain to it. https://pages.cloudflare.com/ ---------------------------------------------------------------------- pope_bacon · 2023-10-29 04:11 I didn't even know this existed. Thank you! ---------------------------------------------------------------------- LidgChris · 2023-10-29 04:37 Was gonna comment this, lol. I did it for a friend/neighbor who runs a community outreach and was getting SHAFTED on the design of his site. Some fly by night company charged him over 5 grand for a website which ended up being just a wordpress landing page with the ability to join a mailing list he didnt even have access to yet after MONTHS. They then set him up with an ERP, didnt explain how to use it, but sold him on it and charged him 200 a month to host it. I ended up offering to design an ACTUAL site for him, and setup his mailing lists and host it until we can transition to something more permanent. I ended up setting him up with Odoo, and making two identical sites so he can ruin one while he learns how to edit things and play with plugins. We just transitioned to a more permanant host, but i still have the sandbox site on my server. It was stressfull even when everything was running smooth and no longer needed my interaction because i now had to worry about changed i make bringing my server to its knees also effecting him and his business (non profit but you get idea). I break shit alot so someone else relying on my server being up wasnt great. ---------------------------------------------------------------------- android_808 · 2023-10-29 08:38 Have you added it to the entry points? https://github.com/htpcBeginner/docker-traefik/blob/master/docker- compose-t2.yml under the Traefik section has it commented out. It's a big file but I just remember it having it. They set the domain names in an .env but you could just type it in. ---------------------------------------------------------------------- Foo-Bar-Baz-001 · 2023-10-30 16:50 So do you want http(s) behind Traefik, or smtp? * Http can be routed by domain because the headers have the information on the domain that is requested. * Smtp does not work that way since most mail servers have their own "traefik" (routing) inside. You may be able to use a third mail server and let that route the mails further internally.