Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Linux Operating System > Linux Talk
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-24-2005, 08:21 PM   #1 (permalink)
goldfish
Junior Member
 
Join Date: Jul 2005
Posts: 27
Default Add browsers to log file

How do I add browsers and referrers to my server logs.
goldfish is offline   Reply With Quote
Sponsored Links
Old 09-25-2005, 10:53 AM   #2 (permalink)
sandman
Junior Member
 
Join Date: Jul 2005
Posts: 36
Default

Hi,

Apache provides a couple of different ways of doing this. The recommended method is to compile the modlogconfig module into your configuration and use the CustomLog directive. You can either log the additional information in files other than your normal transfer log, or you can add them to the records already being written. For example:[HTML]CustomLog logs/access_log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""[/HTML]This will add the values of the User-agent: and Referer: headers, which indicate the client and the referring page, respectively, to the end of each line in the access log.
sandman is offline   Reply With Quote
Old 09-28-2005, 08:54 PM   #3 (permalink)
econ
Junior Member
 
Join Date: Jun 2005
Posts: 28
Default

Hello,

I was wondering how I can create multiple custom logs for my RH9 server?

tia
econ is offline   Reply With Quote
Old 09-29-2005, 07:45 PM   #4 (permalink)
taylor
Junior Member
 
Join Date: Aug 2005
Posts: 28
Default

the interface to all this is via a single directive:

CustomLog. This directive takes both a file name to log to and a custom format. For example, to log user-agents to a file called agents in the logs directory, you would use:
Code:
CustomLog logs/agent "%{user-agent}i"
Other useful log files can also be created. This next two directives create a referrer log and a log of language preferences of your clients:
Code:
CustomLog logs/referer "%{referer}i -> %U" CustomLog logs/language "%{accept-language}i"

hth
taylor is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 01:22 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums