We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Real IP for the visitors (and not the proxy one) Topic is solved
Real IP for the visitors (and not the proxy one)
Hi,
One of my customer need for his prestashop website the geolocalisation by IP.
However, all recorded IPs are the server IP (because nginx proxy I think).
Is there a way to get back the real visitor's IP ?
Thanks !
Hedy
One of my customer need for his prestashop website the geolocalisation by IP.
However, all recorded IPs are the server IP (because nginx proxy I think).
Is there a way to get back the real visitor's IP ?
Thanks !
Hedy
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Real IP for the visitors (and not the proxy one)
Maybe try
Code: Select all
nano +73 /etc/nginx/nginx.conf
set_real_ip_from <your IPv4 & IPv6>;
Re: Real IP for the visitors (and not the proxy one)
I have added this line near line 73 :
But after nginx restart, the remote_addr variable always return the server IP instead of visitor's one...
Code: Select all
set_real_ip_from 213.222.222.222;
Re: Real IP for the visitors (and not the proxy one)
In fact I think the problem is on Apache2 because phpinfo(); function return the remote_addr variable on the Apache section...
Do you know where I can make the same modification on apache2 configuration ?
Do you know where I can make the same modification on apache2 configuration ?
Re: Real IP for the visitors (and not the proxy one)
I have found the solution somewhere else on this forum : viewtopic.php?p=60431#p60431