Mobile app version of vmapp.org
Login or Join
Connie744

: How can I log a user's actual IP address instead of CloudFlare's? My raw access log is now filled with CloudFlare IP addresses. Is there any way I can use a .htacess file or configure the

@Connie744

Posted in: #Cloudflare #Htaccess #IpAddress #Logging

My raw access log is now filled with CloudFlare IP addresses. Is there any way I can use a .htacess file or configure the server to log the user's actual IP address?

With PHP, CloudFlare creates these environment variables for our reference, but I can't find anything similar for raw access logs.

Unfortunately, as suggested in this Stack Overflow question, using mod_cloudflare.c for the following is not an option on a shared hosting server:

$_ENV["HTTP_CF_CONNECTING_IP"]<br>
$_ENV["HTTP_X_FORWARDED_FOR"]<br>
$_ENV["HTTP_CF_IPCOUNTRY"]<br>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Connie744

1 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

We have solutions for restoring original visitor IP with CloudFlare in our knowledge base.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme