I'm looking for some guidance on setting up Tailscale with a reverse proxy using Nginx Proxy Manager. I currently have a bit of a convoluted setup with three servers: one public server (srv1) and two local servers (srv2 and srv3). srv1 is exposed to the internet and uses a domain with an A-record to route traffic. It's in the Tailscale network and forwards requests to srv2, which acts as a bridge to srv3, where my service is actually running. srv3 is also part of the Tailscale network but uses a self-signed certificate for its service. I'm running into a 502 error when trying to access my service via srv1's public domain. Local access through srv2 works fine, and I've tried some troubleshooting with curl, but I'm not getting any useful insights. Any tips on what to check or how to resolve this issue?
2 Answers
Have you tried adding "/web" to your curl request? That might help in pinpointing your issue. Also, check the error logs on the Nginx setup of srv1 to see if anything stands out.
It sounds like your routing could be off somewhere. Make sure that the 'Location' header in the response isn't incorrectly set in your Nginx config for srv1. It might be trying to redirect a path that isn't valid or reachable.

Good idea! When I added "/web", I got a 301 redirection, but the location is pointing to srv3's proxy host. Could the configuration on srv1 be misdirecting traffic?