Typical web servers like Apache and Nginx support virtual hosts (aka server blocks in Nginx terminology)
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
- [email protected] is allowed!
- [email protected] is allowed!
- [email protected] is allowed!
- [email protected] is allowed if topic has to do with selfhosting.
- [email protected] is allowed!
If you see a rule-breaker please DM the mods!
I use virtual hosts frequently with Apache, it's definitely a good way to go.
That is absolutely possible. You just need to point all the domain names to the IPv4 (via the A record) and IPv6 (via the AAAA record) addreses of your VPS and then configure virtual hosts in e.g. nginx or Apache httpd or Traefik with a so called name based virtual hosts that each listen on those IPs (or all IPs of the VPS for simplicity with a listen IP like :: for IPv6 and IPv4 or 0.0.0.0 for just IPv4) and configure each domain as the name for one virtual host you want to serve different content. You then configure SSL/TLS in each virtual host separately with the certificate for that name.
You can, of course, also use some ACME based free certificates from a CA like Let's Encrypt.
On a technical level the server listening on the HTTPS port (443 TCP) will use the name from the TLS handshake's Server Name Indication (SNI) field to decide which certificate to present.