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

Moved to nginx, guest count now only 1

Discussion in 'Troubleshooting and Problems' started by RobParker, Jun 15, 2012.

  1. RobParker

    RobParker Well-Known Member

    I'm not sure if this is a problem or not but overnight we moved from apache to nginx. This morning our users online guest count is 1. It's normally a couple of hundred and comprises of real users and crawlers.

    Is there any reason nginx would stop this number being reported correctly?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Assuming the session count is not correct...

    Are you using session caching?


    $config['cache']['cacheSessions'] = true;
    With session caching enabled, a loss of all sessions can be explained by problems with the cache such as a lack of available memory or uptime problems with the cache server. Just guessing.
  3. RobParker

    RobParker Well-Known Member

    We're using APC for cache.

    Also to be more specific our hosts "setup nginx as a reverse proxy to apache, due to this being an hsphere server. Nginx serves up any static content and caches it, while passing off any dynamicly generated requests over to apache for processing PHP"

    Our members online count seems reasonable, it's just the guests online is reporting 1. Is this because of the proxy?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's possible. You can test it by visiting your forum as a guest to make sure the count reflects your visit. Or try removing the proxy temporarily to see if that affects anything.


  5. RobParker

    RobParker Well-Known Member

    Our hosts fixed it by tweaking the mod_rpaf configuration.
    CyclingTribe likes this.
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If you have specifics I would be interested.
  7. RobParker

    RobParker Well-Known Member

    I've asked them for details and will post when they reply :)
  8. RobParker

    RobParker Well-Known Member

    Our hosts: "added the following configuration into your mod_rpaf module:

    RPAFproxy_ips xx.xx.xxx.xx xx.xx.xxx.xx xx.xx.xxx.xx (our IP addresses removed)

    In this configuration nginx is able to fetch the actual real client IP's from the apache server"

Share This Page