Double Reverse Proxy

  • Used Zammad version: 6.2.0-1711375558.ce1240f3.bookworm
  • Used Zammad installation type: (source, package, docker-compose, …): package
  • Operating system: Debian 12
  • Browser + version: All

How do I pass through the client IP using nested NGINX servers?

For example I have NGINX SERVER → Zammad HOST (running it’s own NGINX).

I see the nginx on the host is setting the CLIENT_IP to the $remote_addr, but how can I pass through the $remote_addr on the main NGINX proxy thru to CLIENT_IP for zammd to get the correct IP?



One solution, depending on your setup, that you could apply is to disable the “zammad nginx” and point your nginx directly to the zammad host ip and port 3000


Then you can change the Zammad environment variable ZAMMAD_BIND_IP to listen to according to Configuration via Environment Variables — Zammad System Documentation documentation

I yet have to test this, but maybe someone from the team can you give detailed information.


Thank you, I didn’t see that. Is there a way to have the rails host the /opt/zammad/public directory?

I was able to figure it out, just had to add the following to the nginx config on the server

set_real_ip_from PROXY_IP;
real_ip_header    X-Real-IP;
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.