Home > AXS Visitor Tracking > Help > 1512

All visitor IP addresses show up as proxy server IP address, not true address

Some web server configurations use a reverse proxy server in front of the web server for load balancing or caching. Under these configurations, all client visits may appear to originate from the IP address of the reverse proxy.

In these cases, you may be able to override the AXS logging behavior to record the visitor's true address by following these steps:

  1. Go the ax.pl or ax.cgi debug screen. Example URL's for this script would be http://your-host/axs/ax.pl?debugme or http://your-host/axs/ax.cgi?debugme.

  2. You should see all of the debug output, including the instructions for tagging at the top of the page.

    Scroll down below, to the list of environment variables. The variables REMOTE_HOST or REMOTE_ADDR should list the IP address of the proxy server. Look for any other variables that contain the true IP address of your machine.

    Under some configurations, HTTP_X_FORWARDED_FOR will be present and will store the true visitor IP address.

  3. If no environment variables are present with the true visitor IP address, then stop here. You will not be able to record visitor IP information with AXS.

  4. Otherwise, edit the logging script ax.pl or ax.cgi. Replace all instances of REMOTE_HOST and REMOTE_ADDR with the name of the environment variable that stores the visitor IP.

  5. AXS should now start recording the correct visitor IP address.


    "All visitor IP addresses show up as proxy server IP address, not true address"
    http://www.xav.com/scripts/axs/help/1512.html