LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Feedback/Feature Requests > Custom log format for use with CloudFlare

Reply
 
Thread Tools Display Modes
  #1  
Old 10-04-2010, 12:58 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
Default Custom log format for use with CloudFlare

Hi,

I enabled CloudFlare on a couple of my websites a couple of days ago, and now faced the problem where the real IP addresses of my visitor is not in my logs anymore.

CloudFlare sends the real IP of clients using a custom HTTP header, but since I'm not using the Enterprise version of LS, I can't use custom logs, and thus can't use "%{Foobar}i" instead of the standard %h.

Just wanted to share that I now lost my visitor's IP addresses because I can't customize the log format.
Would be happy if that feature (or any other way to make LS CloudFlare-compatible) would be avail. in the standard version.

Cheers.
__________________
- Guillaume Boudreau
Reply With Quote
  #2  
Old 10-05-2010, 01:51 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
is the customized header is "X-Forwarded-For"? then
http://www.litespeedtech.com/docs/we...pInProxyHeader
will help.
Reply With Quote
  #3  
Old 10-05-2010, 03:57 AM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
Sadly, no.
It's HTTP_CF_CONNECTING_IP.

Not sure why they don't use the standard X-Forwarded-For...
Will ask them if maybe they could add an option to allow me to choose between both in my account settings... Would indeed fix the problem.

Thanks.
__________________
- Guillaume Boudreau
Reply With Quote
  #4  
Old 10-05-2010, 05:37 AM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
Apparently, they already do fill that header!
It was not documented, thus why I didn't think it was, but enabling this option did give me the correct IP in my logs!

Big thanks for the pointer.

Good day.
__________________
- Guillaume Boudreau
Reply With Quote
  #5  
Old 10-05-2010, 05:57 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
Code:
Apparently, they already do fill that header!
can you check if HTTP_CF_CONNECTING_IP and X-Forwarded-For has same value?
Reply With Quote
  #6  
Old 10-06-2010, 05:05 AM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
Yes, they are the same:
http://ip.danslereseau.com/
__________________
- Guillaume Boudreau
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:48 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.