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

    • Advanced HTTP Header-Based Firewall with VergeCloud

      Understanding the Challenge Traditional firewalls focus on IP-based filtering, which can be bypassed by proxy networks, VPNs, and botnets. As attackers evolve, businesses require finer-grained security controls to detect and block threats at the HTTP ...
    • Setting Up Redirect Page Rules on VergeCloud: Guide to Managing Website Redirects

      Redirect Configuration In this section, you can learn how to direct traffic from a specific URL to another within the Page Rules area. To begin, navigate to the Page Rules section of your user panel under the VergeCloud CDN service and select the ...
    • Page Rules and Caching Settings for WordPress with VergeCloud CDN

      Setting Up Page Rules and Browser Caching for Your WordPress Site with VergeCloud CDN When you activate VergeCloud CDN for your WordPress site, content is cached on VergeCloud's edge servers for 30 minutes by default. However, some parts of your ...
    • Modify HTTP Headers on the Fly with VergeCloud CDN

      Understanding the Challenge Web applications and APIs rely on HTTP headers for authentication, caching, security, and traffic management. However, modifying headers at the origin often requires server-side code changes, leading to: Complex deployment ...
    • Handling Traffic Spikes During Sales

      Understanding the Challenge Sales and Cyber Monday are the biggest sales events of the year, bringing massive traffic surges to e-commerce platforms. While high traffic means more sales, it also introduces critical challenges: Website Slowdowns: ...