Apache mod_remoteip and access logs
Posted
by
GioMac
on Server Fault
See other posts from Server Fault
or by GioMac
Published on 2014-07-29T20:44:45Z
Indexed on
2014/08/25
10:21 UTC
Read the original article
Hit count: 221
Since Apache 2.4 I've started using mod_remoteip instead of mod_extract_forwarded for rewriting client address from x-forwarded-for provided by frontend servers (varnish, squid, apache etc).
So far everything works fine with the modules, i.e. php, cgi, wsgi etc... - client addresses are shown as they should be, but I couldn't write client address in access logs (%a, %h, %{c}a). No luck - I'm always getting 127.0.0.1 (localhost forward ex.).
How to log client's ip address when using mod_remoteip?
© Server Fault or respective owner