Typical web servers like Apache and Nginx support virtual hosts (aka server blocks in Nginx terminology)
I use virtual hosts frequently with Apache, it's definitely a good way to go.
Yes, traefik can do that as well - just point your domains to the VPS and set up yout traefik rules. Traefik will properly create certificates and route accordingly.
#Caddy Server is a reverse proxy like #Traefik. But, in my opinion, easier to configure. https://caddyserver.com/
Yep, what you're looking for is a reverse proxy. All the incoming traffic to the server goes though it, typically on TCP port 80 or 443. Reverse proxy then directs the traffic to all the backend apps. The backend apps can be literally anywhere else or even on the same server on a different port.
Traefik, Caddy, Nginx Proxy Manager, Linuxserver SWAG are the popular choices these days. See which one fits you best.
Edit: Overlooked you mentioning you are already using Traefik. Subdomain, domain, makes no difference. Just point the DNS record to your VPS and have Traefik direct it towards the correct port on the same server.
Self Hosted - Self-hosting your services.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- !everything_git@lemmy.ml is allowed!
- !docker@lemmy.ml is allowed!
- !portainer@lemmy.ml is allowed!
- !fediverse@lemmy.ml is allowed if topic has to do with selfhosting.
- !selfhosted@lemmy.ml is allowed!