6️⃣9️⃣4️⃣2️⃣0️⃣

  • 0 Posts
  • 39 Comments
Joined 1 year ago
cake
Cake day: October 28th, 2023

help-circle
  • Assuming your local service is accessible from the nginx server, you can proxy the request to it:

    server {
      listen 80;
      location / {
        proxy_pass http://10.100.100.2:3000/;
      }
    }
    

    …where 10.100.100.2 is your local IP on the VPN and 3000 is the local port your service is listening on, and 80 is the public port your nginx server listens on. Everything that hits your nginx server at http://yourserver.com:80/ will proxy back to your local service at http://10.100.100.2:3000/. Depending on what you’re hosting, you may need to add some things to the config.