[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] getting requested site from access logs
- Subject: [cobalt-developers] getting requested site from access logs
- From: "Matthew Nuzum" <matt@xxxxxxxxxxxxx>
- Date: Wed May 15 10:23:41 2002
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Well, I've got a site that receives requests for multiple domains. I've
modified the apache log file so that the rewriting of the domain is not
done. Therefore if the name of the site is site1.com but you get to it
by typing site2.com, your browser will continue to show site2.com in the
URL.
I'd like to accurately track how many people come to site1 vs. site2.
However this information is not stored in the log files by default. For
example:
www.site1.com 127.0.0.1 - - [10/May/2002:16:40:47 -0400] "GET
/Image2.jpg HTTP/1.1" 200 6116 "http://www.site1.com/index.htm"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
Appears regardless of the domain (site1.com or site2.com) that was
requested. Combined Log format is by default:
"%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
However, if I instead use:
"%{HOST}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
( notice the first string, %v changed to %{HOST}i )
Then the domain that was actually requested shows up in the log file.
Now, I know that the cobalt server is a delicate balance and tweaking
things can cause undesirable performance. I often find undesirable
performance... well, undesirable. Therefore I want to avoid it.
What kind of an impact would you predict this would have? The first
thing that comes to my mind is the divvying up of log files that occurs
in the evening. I would guess it's for this very reason that the
rewrite rules are on by default. My guess is that the utility that
cobalt uses will discard requests for pages it can't associate with a
site.
This isn't too bad if it's the only thing that happens. I'll probably
try to preprocess the log files anyway. (any tips on this would be
appreciated, namely backing up the log file before any data can be
discarded)
Can you think of any other negative impacts that may occur?
Matthew Nuzum
www.followers.net
matt@xxxxxxxxxxxxx