httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garth Webb" <garth.w...@gmail.com>
Subject Re: [users@httpd] Logging X-Forwaded-For
Date Mon, 05 Jun 2006 11:40:19 GMT
On 6/5/06, Alexander Lazic <al-httpdusers@none.at> wrote:
> Hi,
>
> On Mon 05.06.2006 18:01, Garth Webb wrote:
>
> >Hi, I am using Apache/1.3.33 (Debian GNU/Linux) behind a proxy server
> >(Perlbal) which is sending the X-Forwarded-For header back with each
> >request.  I'm trying to create a custom log format that looks like the
> >stanard 'combined' format that most log parsers use.  What I have is:
> >
> >LogFormat "%{HTTP_X_FORWARDED_FOR}e %l %u %t \"%r\" %>s %b
> >\"%{Referer}i\" \"%{User-Agent}i\"" combined
>
> I'am not sure but shouldn't be:
>
> %{HTTP_X_FORWARDED_FOR}i
>
> Beacause from http://httpd.apache.org/docs/1.3/mod/mod_log_config.html:
>
> ---
> %...{FOOBAR}e:  The contents of the environment variable FOOBAR
> %...{Foobar}i:  The contents of Foobar: header line(s) in the request
>                 sent to the server.

I used the {}e version because the {}i version didn't seem to be
working either.  However, I just tried it again as:

  %{X-Forwarded-For}i

and it worked.  I'm positive thats what I started with, so I guess the
solution was to waste other peoples time on httpd users list to get
this working :(.

Garth

> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message