Support » Plugin: WP Statistics » OVH VPS server IP address shows for all visitors

  • Resolved MarcL85

    (@marclanz)


    Hi,
    All incoming visitors have the same IP address and it is my OVH VPS server.
    I have read a few topics on that matter but it doesn’t seems to work.

    Is there a simple code i can put in a snippet to solve the issue?
    Unfortunately i can’t do any coding myself 🙂

    Thank you very much for your help.
    Marc

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi,

    Please make sure you use the latest version of the plugin because this issue fixed in the latest version.

    To debugging, see your Resources in Optimization page.

    Hi Mostafa,
    Thank you for your quick reply.

    The last version is used. I even cross checked with ‘mehrshaddarzi’ post on GitHub and the modification added to class-wp-statistics.php about 10 days ago.
    Everything in there is in my file too. Must be something that my OVH VPS server is doing.

    Hopefully in the optimisation page, there is info that will help solving the problem.

    Thank you very much
    Have a good weekend,
    Marc

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    We’ll check again.

    Thank you for the reporting the issue.

    Hi Mostafa,
    Some more info, i asked the OVH community (the owner of my VPS server) to see if the server did have a specific output for my IP address.
    Basically i was wondering why my situation is different than the issue you solved not long ago from the Bluehost VPS server…

    Anyway, here is the reply, hope it make sense for you:
    – It seems that i have a reverse proxy and that it is not “remote address” that i need to use in the plugin but “HTTP:X-Forwarded-For” or “HTTP_X_REAL_IP”.
    – Apparently the variable “$_SERVER” need to be configured.

    My computer competences stops there…
    Thank you for looking into it.

    Best Regards,
    Marc

    Plugin Contributor Mehrshad Darzi

    (@mehrshaddarzi)

    Hi @marclanz

    Change

    plugins/wp-statistics/includes/class-wp-statistics.php

    line 758 to

    
    $whip = new \Vectorface\Whip\Whip( \Vectorface\Whip\Whip::PROXY_HEADERS | \Vectorface\Whip\Whip::REMOTE_ADDR );
    

    please test again and tell me result.

    Hi @mehrshaddarzi and @mostafas1990

    It works. All individual website’s stats on the VPS server are now recording specific visitor’s IP within wordpress dashboard. That is perfect.

    THANK YOU so much the both of you for the solution.
    Really appreciate the support and way it has been handle. This free plugins is really good.
    (for info the line was 785 not 758)

    Thank you again
    Best Regards,
    Marc

    Maybe my website has Content Delivery Network
    After updating the plug-in, get the customer’s IP and the previous incorrect, modify the configuration file through this method, successfully and correctly get the IP and address, thank the author very much.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.