The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Information about X-Forwarded-for

Discussion in 'Security' started by davidhan, Oct 6, 2014.

  1. davidhan

    davidhan Member

    Joined:
    Sep 18, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    technewonline
    cPanel Access Level:
    Website Owner
    Hello everyone.
    Can someone suggest the best way of reading the X-Forwarded-for header and putting the IP in the apache logs as well as the real IP as I've been experimenting with putting a proxy cache infront of my apache server to see if it speeds things up.

    Problem is now of course all the requests in the logs show the proxy ip instead of the actual IP, ideally i'd like the logs to show the actuall ip and what x-forwarded-for is coming up with.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will likely need to modify the LogFormat entry in your Apache configuration file. I found several results with potential solutions when searching for entries such as "LogFormat "%{X-Forwarded-For}" on Google. Remember to follow our documentation when editing the Apache configuration:

    Advanced Apache Configuration - EasyApache - cPanel Documentation

    Thank you.
     
  3. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    In addition to the good information from cPanelMichael, you might want to look at mod_remoteip or mod_zeus
     
Loading...
Similar Threads - Information Forwarded
  1. CCSupport
    Replies:
    3
    Views:
    871

Share This Page