this post was submitted on 07 Jul 2023
12 points (92.9% liked)

Self Hosted - Self-hosting your services.

11484 readers
1 users here now

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

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!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS
 

Is it possible/practical to host multiple websites from the same VPS server?

I have a number of domains (for example): bilbobaggins.com, rx4free.com, mypersonalblog.com

I don’t get much traffic and I’m not interested in paying for separate servers for each domain. But I still want https certificates to work properly.

Now I’m familiar with setting up wildcard subdomains with traefik and letsencrypt. But can I do the same or similar with completely different domains such as listed above?

top 5 comments
sorted by: hot top controversial new old
[–] qazwsxedcrfv000@lemmy.unknownsys.com 15 points 1 year ago (1 children)

Typical web servers like Apache and Nginx support virtual hosts (aka server blocks in Nginx terminology)

[–] noisy@lemmy.ml 1 points 1 year ago

I use virtual hosts frequently with Apache, it's definitely a good way to go.

[–] flip@lemmy.nbsp.one 8 points 1 year ago (1 children)

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.

[–] gmartin@lemmy.gmprojects.pro 2 points 1 year ago

#Caddy Server is a reverse proxy like #Traefik. But, in my opinion, easier to configure. https://caddyserver.com/

[–] lemmy@lemmy.nsw2.xyz 3 points 1 year ago* (last edited 1 year ago)

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.

load more comments
view more: next ›