Comment on Help with Getting My Reverse Proxy to Forward the Correct IP Address
treadful@lemmy.zip 7 hours ago
You’re gonna want to configure nginx to send along an X-Forwarded-For HTTP header (there’s also Forwarded, but it’s not as well supported yet). An example in a location block:
location / { proxy_pass http://backend/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
ampersandrew@lemmy.world 6 hours ago
I’m not quite sure where this goes. It’s Nginx Proxy Manager (in case that affects your answer compared to vanilla nginx), and I’m using Docker Desktop for much the same reason: I’m doing as much configuration via GUI as possible. Is this a Docker configuration or an Nginx Proxy Manager configuration? There is a “Custom Nginx Configuration” screen for my Proxy Host; does it go there? In a nested location block?
roofuskit@lemmy.world 2 hours ago
ssl.conf
treadful@lemmy.zip 5 hours ago
I really don’t know shit about the GUI tools, but presumably they overlay on the same configuration.
The config I posted would be part of the nginx configuration. You’re instructing it to append the client IP to the
X-Forwarded-Forheader.I doubt it, but I’m not sure. The
locationblock would normally be where your reverse proxy configuration would already be, and you’d need to just add that one line. But again, I don’t know how that translates to these GUI tools. Maybe if you search forproxy_add_x_forwarded_forand “Nginx Proxy Manager” you might find what you need.ampersandrew@lemmy.world 5 hours ago
I know you said you don’t know anything about the GUI equivalent, so I’m mostly responding to this comment to publicly post how far I’ve gotten off of your tips. There is a “Custom Locations” tab for my proxy host in NPM, but even after attempting to follow this guide I found, I can’t get my custom locations to persist after hitting the Save button.