Feature request: Add support for `real_ip_header` in nginx
syphernl opened this issue · 3 comments
SUMMARY
Our Zabbix is behind a reverse proxy (Application Gateway) and has the client IP in X-Forwarded-For
.
We'd like to instruct nginx to use that IP as client IP rather than the client IP it currently gets, as this is the IP of the loadbalancer.
Usually real_ip_header X-Forwarded-For;
can be used for that but it doesn't appear this can be easily added to the zabbix-web-nginx without having to modify the container and adding a file to /etc/nginx/conf.d
You can use volume mount and mount /etc/nginx/nginx.conf. Is not it solution?
That's actually the workaround/alternative I was implementing. I have mounted a custom config file in the /etc/nginx/conf.d
folder which works as expected.
So I guess it doesn't have to be a feature for the container 😄
it is quite difficult to add all possible features of Nginx / PHP-FPM, so it is better in some cases use just additional volumes.