Forum Discussion
Atif_Malik_1133
Nimbostratus
Nov 10, 2005(re)Setting remote_addr
I saw several posts on how to get the real client ip to be forwarded as a variable. My problem is slightly different I want to reset the variable REMOTE_ADDR to be the real client address. All the iru...
hoolio
Cirrostratus
May 23, 2007If you're wanting to modify how Apache logs HTTP headers, I think you can use the LogFormat directive in your httpd.conf. SOL4816 (Click here) has an example:
Apache web server
You can configure an Apache web server to extract the IP address from the X-Forwarded-For HTTP header and log the IP address to the web server log file by adding the appropriate logging directives to the Apache httpd.conf file. For example:
LogFormat "%v %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" X-Forwarded-For
CustomLog /var/log/apache/www.example.com-xforwarded.log X-Forwarded-For
Refer to the Apache logging documentation for more details.
You can probably find more examples by googling 'Apache LogFormat Directive'.
http://httpd.apache.org/docs/1.3/mod/mod_log_config.htmllogformat
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
