this post was submitted on 06 Jun 2023
19 points (100.0% liked)

Technology

1928 readers
7 users here now

Rumors, happenings, and innovations in the technology sphere. If it's technological news, it probably belongs here.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

Hello, all. I'll start this post off with - this is a test. :P I have the same topic posted at /r/... seeing if I get any l<3ve over here!!! I hope so!!! LemmyNet for the WiN!

I have two domains that I pay for... lets call them domain1.com and domain2.com. I'm running a Bitwarden docker container that uses nginx to serve the website... its address is bitwarden.domain1.com .

I'm running a HUGO website with Apache2... its address is domain2.com .

I have one local IP address; currently, I forward ports 80 & 443 to the local IP of the Bitwarden VM. So... thats my issue; I don't understand how to forward these two different services to the domains that I want them on... I've read about Apache2's vhosts - but the websites are on different VMs, and the Bitwarden docker container uses nginx.

I've thought about condensing and putting both services in one VM; but theres still the apache2/nginx issue. I've heard someone mention I should use a third VM to route the traffic to the correct local IPs - but I don't know what software I'd use.

I've thought about using a Cloudflare tunnel for one of those services; but I don't really want to pay, and aren't sure how fast a free Cloudflare tunnel would be - this might be a solution for the Bitwarden service, as I'm the only one accessing it...

Does anyone have any suggestions? I'm sure I'm just novice enough that I don't see the obvious solution - and I'd love to get both sites up and running. Thanks for any input or help!!!

pAULIE42o . . . . . . . . . . . /s

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

With Cloudflare tunnels, I found I could only authorise one top level domain (perhaps multiple is a paid feature, I'm not sure), but I found I could run a second cloudflared in docker to authorise the second.

If you're running VMs, you can probably use tunnels no problem, with Cloudflare routing to the appropriate domain.

If you're against Cloudflare, there should be no reason you can't have nginx grab all traffic then forward the request to your apache2 server based on the host name.

[–] [email protected] 3 points 1 year ago (2 children)

I'd only need Cloudflare for one of the sites/VMs; or, both if it'll handle it easily - I'll be hosting both sites on my hardware. No sites data will be on Cloudflare, I was only thinking about using a tunnel from them to take care of one, or both, the sites.

Thank you for the reply - I'm blown away that I've gotten all these suggestions on LemmyNet before one reply on /r/!

[–] [email protected] 4 points 1 year ago

Reddit has loads of people asking and not enough answering. Lemmy has lots of new users and not enough posts to answer, so you got lucky :)

[–] [email protected] 2 points 1 year ago (1 children)

The spirit of (small) community shines here, it would seem 😀

[–] [email protected] 3 points 1 year ago

YES; I am loving the LemmyNet; I'll be here for awhile.