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 with/through NGINX reverse proxy
Real IP with/through NGINX reverse proxy
Hi there. I've been using VestaCP since not long ago and have found that neither the forum or CMS register the real IP of my visitors.
I wonder how to register the real IP of my visitors and not the IP of the server itself (the same with NGINX reverse proxy and Apache).
I have installed version 0.9.8-10 of VestaCP on Ubuntu Server 14.04 LTS 64-bits
Thank you very much in advance. A greeting.
I wonder how to register the real IP of my visitors and not the IP of the server itself (the same with NGINX reverse proxy and Apache).
I have installed version 0.9.8-10 of VestaCP on Ubuntu Server 14.04 LTS 64-bits
Thank you very much in advance. A greeting.
Re: Real IP with/through NGINX reverse proxy
I found a guide that may be useful. http://thejoyofstick.com/blog/2013/04/1 ... ind-nginx/
Re: Real IP with/through NGINX reverse proxy
Yes, I have tried to do just that, but I see is configured in VestaCP by default, but I dont know because it doesn't works correctly. I dont know if it is a bug or some kind of problem I have VestaCP. I have installed VestaCP on several servers and they all give me the same problem (without change configurations).rhonk wrote:I found a guide that may be useful. http://thejoyofstick.com/blog/2013/04/1 ... ind-nginx/
I still dont know how to fix it or what might be wrong.
Re: Real IP with/through NGINX reverse proxy
I still have the same problem. The only solution I've found, example for WordPress, is adding:
in a functions.php file. Is there any solution to this? I still do not know because it shows me the IP reverse proxy and not the IP of the user connecting to the web.
Code: Select all
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $ips[0];
}