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

Technology

37551 readers
278 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

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

top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 year ago

Everyone here is awesome for ALL the replies. :P Thank you!!

I decided to try a Cloudflared tunnel, but that didn't work out because I can't get the main domain1.com domain to go thru the tunnel... only 'apps', like blog.domain1.com. :P

And, I'm still ironing out how to pass nginx to another local IP on my network; I just haven't gotten it to click yet. All the info needed is right here - I promise to come back when I iron out the setup and post how I managed to do it...

I can figure out how to pass nginx [or apache2, for that matter] to another PORT on the same local IP - I think I have both domains listening on ports 80/443 - and I'll have to change that in order to route the data correctly... let alone getting out to another local IP.

Again appreciate all the info - sometimes I just have to learn a bit more since I have all the documents right here. :P

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

Alright, I wanted to come back now that my setup is complete... special thanks to those of you who suggested nginx-proxy-manager - its very nicely put together and really makes reverse proxies a breeze...

Long story short, I just created a brand new VM... started with the proxy manager and built on top of that. Next up was my static Hugo website; it was too easy to point change Apache2's ports.conf to 8097 instead of 80, and use nginx-proxy-manager for the SSL certs... that one was basically plug and play.

The Bitwarden bit was a bit more involved, but not too bad... at first I just redirected traffic to the original (other machine) Bitwarden VM - but no one wants an extra VM to backup and support... so I went with a fork Docker of bitwarden_rs/vaultmaster - it comes w/ e-mail setup in the container, so one less thing to worry about... I had to swap around some docker-compose.yml ports and just point nginx-proxy-manager at it... this time, tho, I used the SSL certs from the docker; I didn't wanna dig in and remove what they already had running.

In the middle I was still fighting with myself and not taking ya'lls good suggestions - I tried to go the Cloudflared route; which is a cool service... but you can't tunnel root domains unless you're a paid user. Cloudflared tunnels would be great for exposing the Plex, TrueNAS, etc's of the world... but I didn't NEED/want subnets.

Thanks to the Beehaw community... TechHeart.life is up and running. :P (Don't worry, the Bitwarden is on a private domain. Phhhbbbbtttt.)