By using its ip:port
If you have homeserver1 running stuff and that’s connected to the vps through vpn you make sure your homeserver1 service that you want to proxy runs on the homeserver1’s vpn ip.
For docker this is done by specifying that ip when you expose ports or use 0.0.0.0
I assume you can already ping homeserver1 from the vps by using the vpn address of homeserver1
69420@lemmy.world 1 week ago
Assuming your local service is accessible from the nginx server, you can proxy the request to it:
…where
10.100.100.2
is your local IP on the VPN and3000
is the local port your service is listening on, and80
is the public port your nginx server listens on. Everything that hits your nginx server athttp://yourserver.com:80/
will proxy back to your local service athttp://10.100.100.2:3000/
. Depending on what you’re hosting, you may need to add some things to the config.