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

    • Related Articles

    • DMARC Record and Configuration in VergeCloud User Panel

      DMARC, which stands for Domain-based Message Authentication, Reporting, and Conformance, is a crucial email authentication protocol provided by VergeCloud. It leverages two existing mechanisms, SPF (Sender Policy Framework) and DKIM (DomainKeys ...
    • AAAA Record and Configuration in VergeCloud User Panel

      For a browser to access a website, it must first determine the website's IP address. The DNS service plays a crucial role in this process, converting the entered domain name into the corresponding IP address. The distributed DNS database contains ...
    • Time to Live (TTL) and DNS Record Configuration in VergeCloud User Panel

      Time to Live (TTL) Time to Live (TTL) is a fundamental parameter in the Domain Name System (DNS) that specifies the duration (in seconds) that a DNS record is allowed to be cached by a recursive resolver. Essentially, TTL determines how long DNS ...
    • ANAME Record and Configuration in VergeCloud User Panel

      Understanding ANAME Records An ANAME record can be viewed as a hybrid of CNAME and A records. This type of record operates similarly to a CNAME record by enabling one domain to point to another. However, the distinction lies in that a CNAME record ...
    • IP Address Classes and CIDR Notation

      IP Address Classes IP address classes are part of the classful network architecture that was used before the introduction of CIDR (Classless Inter-Domain Routing). They categorize IP addresses into different classes based on their range and intended ...