Page 2 of 2
Re: Original visitors IP X forwarded Headers
Posted: Wed Sep 09, 2015 12:28 pm
by floown
Hello,
I have the same problem on my Ubuntu server.
My question : where should I put : set_real_ip_from localised in /etc/nginx/nginx.con ? After witch line ?
Thx.
Re: Original visitors IP X forwarded Headers
Posted: Tue Sep 13, 2016 8:59 pm
by dpeca
To see real IP in Apache logs just change in apache2.conf:
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
to
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
Re: Original visitors IP X forwarded Headers
Posted: Thu Mar 05, 2020 9:53 pm
by Mavashi
dpeca wrote: Tue Sep 13, 2016 8:59 pm
To see real IP in Apache logs just change in apache2.conf:
LogFormat "
%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
to
LogFormat "
%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
Great tip. I used it long ago and it still works for VestaCP.
I added it to my post-install script to don't forget as following:
Code: Select all
sed -i 's|LogFormat "%h|LogFormat "%a|g' /etc/apache2/apache2.conf