Log X-Forwarded-For

https://httpd.apache.org/docs/current/mod/mod_remoteip.html
https://www.loadbalancer.org/blog/apache-and-x-forwarded-for-headers/

uncoment
#LoadModule remoteip_module libexec/apache24/mod_remoteip.so

In section add:
RemoteIPHeader X-Forwarded-For
LogFormat “%{X-Forwarded-For}i %h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\ ” combine
LogFormat “%{X-Forwarded-For}i %h %l %u %t \”%r\” %s %b \”%{Referer}i\” \”%{User-agent}i\”” combined-forwarded

# apachectl configtest
# /usr/local/etc/rc.d/apache24 restart

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.