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.

HTTP_X_FORWARDED_FOR in httpd Logs

Discussion in 'General Discussion' started by anup123, Oct 5, 2004.

  1. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Hi.

    I am trying to get the HTTP_X_FORWARDED_FOR in the httpd logs with following LogFormat directives:

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{HTTP_X_FORWARDED_FOR}e\" \"%{HTTP_CLIENT_IP}e\"" combined

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{HTTP_X_FORWARDED_FOR}e\" \"%{HTTP_CLIENT_IP}e\"" common

    This shows the value correctly in logs/access_log but for the domlos/domain.tld it's always showing "-" "-" for the last two whereas logs/access_log logs the correct values.

    Where am i goofing? I would want the same to be logged in domlogs/domain.tld also.

    TIA
    Anup
     
Loading...

Share This Page