Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    890
    Likes Received:
    1
    Trophy Points:
    168
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice