Exactly this. This procedure is so common that you need to take care in situations where you don’t want the headers, as some tools set them per default.
Comment on Retain source IP when proxying through VPS
mholiv@lemmy.world 10 months ago
You want to set the appropriate X-Forwarded-For or Forwarded headers in Nginx. The final application server being proxied (if well written) should be able to handle that.
Documentation can be found here. www.nginx.com/resources/wiki/start/…/forwarded/
Contrary to that other comment reverse proxies with actual IPs forwarded through them via the appropriate headers are normal and used commonly. Almost 100% so at scale.
Don’t let the wannabe elitists get you down. I personally would not host my production email server at home but self hosting is a learning journey. If you learn how email serves work along with reverse proxies you got it! That’s a win. Hack away.
Lichtblitz@discuss.tchncs.de 10 months ago
SeeJayEmm@lemmy.procrastinati.org 10 months ago
You nailed it on the head. This is a project for the experience and because I enjoy experimenting. If I can make this work to my satisfaction I may consider putting my primary domain behind it some day.
Thanks for the info and the support.