• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Guests Not Being Counted

spitz

New member
#1
I recently pointed my Xenforo install server's DNS to Ezoic nameservers. Ezoic is an ad management service. The Ezoic servers then request the content from my site to serve to visitors.

Right away, this created an issue where members were unable to login. I found the member login solution below, here on the site.

This solution I used was to add this to my config.php file
$_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_X_FORWARDED_FOR"];

That solved the member login issue.

Now I've noticed that the guest count is always just 1. This has always been much higher. The guests aren't being counted like they should be.

Any ideas on how to get the guests counted again with this setup?

Thanks!
Eric
 

Mike

XenForo developer
Staff member
#2
I see a guest count higher than 1 on your site now.

If that header has the real IP in it, then that change should work for guests too (the server receiving the proxy/load balancer IP would cause this as well).
 

spitz

New member
#3
Thank you. I do see every once in a while the guest count will bump up by a few, maybe as high as 6 or so. It's still nothing like it was before pointing the dns. It seemed like it was always around 40-50. Traffic hasn't changed otherwise.

I have a bit more info after looking at it some more that may point to something else. I just don't know enough about it to understand what it might point to.

-When checking the Current Visitor page, All of the IP's for Members are 127.0.0.1
-When I visit the site from another browser or other device, the visit doesn't show in the Current Visitor, Guest area
-When I visit /admin.php?tools/phpinfo , my IP is nowhere in the log. FORWARDED_FOR, REAL_IP, and REMOTE_ADDR all show 127.0.0.1

Does any of this point to a better solution to pass the IP?

the server receiving the proxy/load balancer IP would cause this as well
Is there a setting or config edit that would address this?

Thanks,
Eric
 

Mike

XenForo developer
Staff member
#4
Does any of this point to a better solution to pass the IP?
If your IP is nowhere to be found on that page, there's nothing you can do. You need to contact your host as they're simply not passing you the IP of the person connecting.