httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent 'Dax' Royal-Gordon <br...@brentdax.com>
Subject Re: [users@httpd] Band Monitoring tool for apache
Date Tue, 25 May 2004 07:23:47 GMT
Muhammad Rizwan Khan wrote:

> Thanks for your usefull reply. I am liitle confused while using access_log, 
> plz. tell me the right way to read/use it. I am sending you 2 enteries of my 
> access_log file for example:
> 127.0.0.1 - - [23/May/2004:12:16:41 +0600] "GET /images/yes.jpg HTTP/1.1" 404 
> 283 "http://enoise.net/pop_profile.asp?mode=display&id=2" "Mozilla/5.0 (X11; 
> U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01"
> 127.0.0.1 - - [23/May/2004:12:16:48 +0600] "GET /images/yes.jpg HTTP/1.1" 404 
> 283 "http://enoise.net/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) 
> Gecko/20021120 Netscape/7.01"

In both of these entries, 283 is the magic number.  What this log 
doesn't contain is the virtual host for each request--you might want to 
put %v somewhere in your LogFormat directives.  For example, my 
httpd.conf has this line:

LogFormat "%h %l %u %t %v \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\"" combined

Hence, my log lines look like this:

218.214.19.70 - - [25/May/2004:00:15:38 -0700] www.filespace.org "GET 
/LMX/SigmaSpaceBase.lxl HTTP/1.1" 200 252923 
"http://forums.thegaminguniverse.com/showthread.php?s=&threadid=10311" 
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"

Of course, you can put the %v wherever you want in that line, such as 
after the size, or at the very beginning of the line.

-- 
Brent "Dax" Royal-Gordon <brent@brentdax.com>
Perl and Parrot hacker

Oceania has always been at war with Eastasia.

---------------------------------------------------------------------
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