How to Record Visitors' True IP Addresses with VergeCloud

How to Record Visitors' True IP Addresses with VergeCloud

Recording True IP Addresses Behind VergeCloud Proxy

VergeCloud employs a reverse proxy approach, meaning the visitor IP addresses displayed in logs often show VergeCloud's IP instead of the actual visitor IPs. To address this, VergeCloud stores the real IP addresses in dedicated HTTP headers, which can be logged using configurations for Nginx, Apache, and IIS.

How to Record Visitors' True IP Addresses in Nginx

To capture the actual IP addresses in Nginx, use the following headers:

log_format test1 ‘… $http_x_real_ip $http_ar_real_ip $http_x_real_ip…’

Configure the log format as follows:

access_log test1;

An example configuration may look like this:


log_format test1 '$http_x_real_ip - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent' 
'"$http_referer" "$http_user_agent "$http_ar_real_ip" "$http_x_real_ip"';

How to Record Visitors' True IP Addresses in Apache

To log the true IP addresses in Apache, include these values in your log format:

"%{X-Forwarded-For} %{X-Real-Ip} %{x-real-ip}i"

A basic log format example in Apache:


LogFormat " %h %l %u %t \"%r\" %>s %b %{X-Forwarded-For} %{X-Real-Ip} %{x-real-ip}i" test1

How to Record Visitors' True IP Addresses in IIS

To log true IP addresses in IIS:

  1. Navigate to: IIS Config > Logging.
  2. Select Select Fields.
  3. Click on Add Field.
  4. Add the following headers:
    • x-real-ip
    • X-Real-Ip
    • X-Forwarded-For