TL;DR
i can’t get real visitor ip in hestia, in vesta all good. I CAN PAY IN BITCOINS FOR SOLUTION AND I NEED IT ASAP
switched from vesta, all good but one thing.
i use separated nginx frontend proxy, and all i need that HTTP_X_FORWARDED_FOR header gets the real visitor IP. but i have it in this way 127.0.0.1, 127.0.0.2 (just example)
first one 127.0.0.1 it’s real visitor ip, all good but i get also 127.0.0.2 and here goes my nginx proxy ip
always used this config, with any panel, even with cPanels on shared hostings. but can’t get it done with hestia. sites working, but header x_forwarded_for in <?php phpinfo(); ?> page shows like
$_SERVER[‘HTTP_X_FORWARDED_FOR’] REAL IP HERE, NGINX FRONTEND IP HERE
so it’s doubled, but i need only real ip of the visitor.
used vesta before hestia, in vesta all good
hestia is installed with apache+nginx.
tried your config in post above, nothing works.
i mean, i see only IP of my front-end proxy
and no real IP
looks like i get it done
just commented #proxy_set_header X-Real-IP $proxy_add_x_forwarded_for; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
in hestia nginx.conf
now it looks good
just one question
why, i mean srsly, WHY on vesta, SAME config but it works, but why on hestia such prolems ?
i didn’t comment #proxy_set_header X-Real-IP $proxy_add_x_forwarded_for; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
this on vesta, but it’s present there too, BUT, no problems at all
WHY on hestia it’s doesn’t work ?
Do you have multiple IPs on the destination server? If I remember right there was something in apache2 to enable or adjust, so it receives the headers correctly.
I can look it up tomorrow right now I am only on mobile and it’s late here…
I just checked. please make sure mod_remoteip is enabled with apache2 (should be by default) and if /etc/apache2/mods-enabled/remoteip.conf has all of your IPs in it. If I remember correctly I hab a problem there with a multi IP server back in the days.
I am also not sure how nginx in the middle passes on the already set x-forwarded-for header, so could be that you should adjust the IP from the sending server in that remoteip conf to the one from your frontend-proxy instead of the local one…
simple: Hestia is not Vesta and we changed quite some things for a lot of different reasons. and we cannot and will not guarantue backwards compatibility in all regards. so, sorry to say, but feel free to stick with Vesta, otherwise you might need to invest a bit time and work to find the right configuration for you