nginx with ngx_http_realip_module module compiled in
The ngx_http_realip_module module is a commonly-used nginx module allows nginx logs (and headers, etc.) to show the proper IP address even when a request comes from a proxy. From their site -
The ngx_http_realip_module module is used to change the client address and optional port to the one sent in the specified header fields.
I think adding this to the existing nginx package would be a matter of adding “—with-http_realip_module” here.
I don’t have a strong feeling about if this should be in a new “nginx-realip” package, or just added to the main one. I do know that everyone who runs a web app inside Alpine and uses a service like CloudFlare or who’s behind an ELB (on AWS) should be using this nginx module.
(from redmine: issue id 5712, created on 2016-06-12, closed on 2017-05-22)
- Changesets:
- Revision d67ac9a7 on 2016-12-27T09:48:08Z:
main/nginx: enable http_realip_module
fixes #5712
needed to properly track original client IP through multiple
layers of proxies/load-balancers.