Any chance of enabling this option in Litespeed?

Status
Not open for further replies.

ruggiero66

New Member
Messages
11
Reaction score
0
Points
0
Hello, I am using Cloudflare with my websites hosted on Chopin [Free] as well as S4.x10premium.com. When calling the PHP function to determine a client's IP address and/or display it on my site, the address returned is the one of Cloudflare's proxy. Since the free and paid servers are now using Litespeed instead of Apache, there is an easy fix, but I don't have access to this in my CPanel. According to CloudFlare, you need to enable "Use Client IP in Header" in the Litespeed web admin console. Can this be done? Thanks very much! - Joe

---------- Post added at 07:07 PM ---------- Previous post was at 02:35 PM ----------

Heads up,

To enable this on a site-by-site basis, I needed to add THIS CODE to my "config.php" file on my site:

if($_SERVER['HTTP_CF_CONNECTING_IP']){
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
}


Still would be nice if this WAS enabled by default on the server, since you guys are using CloudFlare.

- Joe
 
Status
Not open for further replies.
Top