Original visitors IP X forwarded Headers
Re: Original visitors IP X forwarded Headers
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.
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
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
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
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