Stupid Question - Routing subdomains to various services on a single host.

Edit

Damn, Lemmy is so awesome!

Thanks so much everybody for the quick amazing replies! I will look into the suggested reverse proxy options and get something set up.

Thanks again for all of the insight!

End edit

Let’s say I have multiple services and applications running on my server.

In this case, I’m using docker and have layer 2 docker network to give each container a dedicated IP.

Internally, I can navigate to the local IP to utilize or access them.

How would I go about accessing each service through the internet using different subdomains? Right now all subdomains and the primary domain route directly to my external IP and seem to all resolve to the same service /application.

I imagine this would have to be done with some sort of routing rules but would love some insight! I have a UniFi Dream Router.

TheInsane42,
@TheInsane42@lemmy.world avatar

I’m an apache user myself. It’s used for static websites as well as other services bia reverse proxying. Letsencrypt for the certs and ssl termination in apache. I’m even considering doing all ipv6 only.

Any webserver or reverse proxy will do though.

MoogleMaestro,
@MoogleMaestro@kbin.social avatar

My understanding is that you'd need a combination of a reverse proxy and a general proxy manager. Nginx Proxy Manager handles a lot of these tasks for me on my website, with most of my use being a simple redirect though.

netburnr,
@netburnr@lemmy.world avatar

I like virtualmin as a web based solution. Includes proxy options

EliteCow,
@EliteCow@lemmy.dbzer0.com avatar

Damn, Lemmy is so awesome!

Thanks so much everybody for the quick amazing replies! I will look into the suggested reverse proxy options and get something set up.

Thanks again for all of the insight!

jonno,

Take a look at caddy server or the nginx proxy manager and set up a reverse proxy.

EliteCow,
@EliteCow@lemmy.dbzer0.com avatar

I ended up setting Caddy. Super easy to add to the Caddyfile (config) and it just works!

I’m going to also look into Traefik as it looks like it has a nice gui.

Thanks a lot!

breadsmasher,
@breadsmasher@lemmy.world avatar

Do you have a reverse proxy? Thats the bit you need

stackoverflow.com/…/how-to-setup-dynamic-subdomai…

And cloudflare possibly

developers.cloudflare.com/dns/…/subdomain-setup/

ask,

What you need is a reverse proxy server. All the major web servers have this feature.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines