Re: X-Forwarded-For headers?
Edward Rudd <[email protected]> Sun, 8 Aug 2004 23:38:16 -0500
| Newsgroups | gmane.comp.apache.mod-log-sql |
|---|---|
| Message-ID | <[email protected]> |
Quoting Paul Chvostek <[email protected]>: > Heya. > > I'm trying to get mod_log_sql running on a web server behind a proxy > (Pound, from http://apsis.ch/pound/). The proxy correctly sends the > X-Forwarded-For header lines to indicate the original requestor, so in > the bad-old-days, I built my combined logs with: > > LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" > \"%{User-Agent}i\"" combined > > Now... how do I get out of the bad-old-days? Section 3.6.17 of the > version 1.18 documentation (I'm using Apache 1.3) doesn't mention the > X-Forwarded-For header, nor is it mentioned in the equivalent unnumbered > section of the docs for 2.0. I also can't find anything that would > allow me to specify additional headers myself. > You can use the LogSQLWhichHeadersIn to log that header, be sure to also log Unique ID (from mod_unique_id) Another alternative, mod_log_sql 1.9x only, would be to write a sub-module for mod_log_sql to log the x-forwarded-for header into a new field. Look at the source code for mod_log_sql_ssl.c for an example. > Am I missing something obvious, or am I really making a feature request? > Given the benefits of mod_log_sql for aggregating the log data of a farm > of web servers, support for X-Forwarded-For would seem like an obvious > requirement. :) I would categorize this under feature request. I will look into adding this into the core distribution.. I am working on redoing some of the code to determine what is logged.. as the current setup is rather cumbersome. Edward Rudd <[email protected]> Web Page <http://www.outoforder.cc/> _______________________________________________ Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/ To unsubscribe send an e-mail to mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org