Vesta 2.0 is coming soon! See our progress update: https://vestacp.com/docs/vesta-2-update
Solution to obtain the source IP address. REMOTE_ADDR
Re: Solution to obtain the source IP address. REMOTE_ADDR
Works perfectly od Debian 8.5.
Re: Solution to obtain the source IP address. REMOTE_ADDR
thanks!dsystem wrote:I tried all the tips in this topic cited. But it didn't work.
I found out that apache 2.4 has the remoteip native and the rpaf is no longer supported.
I'll put here changes in Ubuntu 14.04.1
Remove rpaf that doesn't work.
# apt-get remove libapache2-mod-rpaf
create the file remoteip.conf
# nano /etc/apache2/mods-available/remoteip.confActivate remoteip which is native in Apache 2.4Code: Select all
<IfModule mod_remoteip.c> RemoteIPHeader X-Real-IP RemoteIPInternalProxy 127.0.0.1 RemoteIPInternalProxy xxx.xxx.185.66 // server ip </IfModule>
a2enmod remoteip
service apache2 restart
Now works perfectly...
All my config was working, after installing mod security some extra modules were installed also i beleive that broke my previous config.... so my config stopped working...and i didn't see my remote IP as before
then, finally i just disable module rpaf: sudo a2dismod rpaf
And it worked again as before
EDIT: in vestacp, in the accesslog of the domain, the ip of the server was registered, not the client public ip address, so i follow this step:
Change the Log Format (%h -> %a)
#sudo vi /etc/apache2/apache2.conf
Before: LogFormat “%h %l %u %t \”%r\” %>s %O \”%{Referer}i\” \”%{User-Agent}i\”” combined
After: LogFormat “%a %l %u %t \”%r\” %>s %O \”%{Referer}i\” \”%{User-Agent}i\”” combined
tip from: http://www.olivershanahan.com/?p=35
thanks for your post