Apache-2.4 has own module mod_remoteip
you may use it with nginx such:
....
RemoteIPHeader X-Forwarded-For
....
but I found 2 issues for me:
1. I must change LogFormat ( replace %h with %a) to show original IP in logs
2. /server-status/ page show nginx ip address instead original
So, i deside to use mod_rpaf. Defaut veriosn does not compile with aapche-2.4.
To solve the issue:
replace “remote_” with “client_” in “mod_rpaf-2.0.c”
"This module is used to treat the useragent which initiated the request as the originating useragent as identified by httpd for the purposes of authorization and logging, even where that useragent is behind a load balancer, front end server, or proxy server."
you may use it with nginx such:
....
RemoteIPHeader X-Forwarded-For
....
but I found 2 issues for me:
1. I must change LogFormat ( replace %h with %a) to show original IP in logs
2. /server-status/ page show nginx ip address instead original
So, i deside to use mod_rpaf. Defaut veriosn does not compile with aapche-2.4.
To solve the issue:
replace “remote_” with “client_” in “mod_rpaf-2.0.c”