[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nobie questions (1. about apache, 2. about linux)
- To: Alon Kadury <kadury(at-nospam)hotmail.com>
- Subject: Re: nobie questions (1. about apache, 2. about linux)
- From: Tzafrir Cohen <tzafrir(at-nospam)technion.ac.il>
- Date: Sun, 11 Nov 2001 18:07:09 +0200 (IST)
- cc: Linux-IL Mailing List <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <F119gRkQ9ZPWv1QJ2NX000042b5@hotmail.com>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Sun, 11 Nov 2001, Alon Kadury wrote:
> hi and thanks,
> i also have those lines in my httpd.conf
> however i'm trying to reach other variables (like remote_addr), but can't
> (there is a diffrence between http-header and request variables).
> a jsp and php script that i did can reach it, howeveri want to log them in
> the :
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}\""
> combined line.
> i've tried apache web site but didn't find help beside %{env:remote_addr},
> but this does not seem to work.
"doesn't work" == ???
What does happen? Is this text printed literally in the log?
Anyway,
Just from reading mod/mod_log_config.html#formats in apache's manual
(version 1.3.20)
Custom Log Formats
...
The characteristics of the request itself are logged by placing "%"
directives in the format string, which are replaced in the log file by
the values as follows:
%...a: Remote IP-address
...
%...{FOOBAR}e: The contents of the environment variable FOOBAR
http://httpd.apache.org/docs/mod/mod_log_config.html#formats
Haven't tried it, though. I also don't know if this has changed since
version 1.3.6 (or is it 1.3.9?) of apache that comes with RH 5.2.
Note that it is %FOOBAR}e and not %{env:FOOBAR} .
--
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il