Re: log file

This is a discussion on Re: log file within the Apache forums in Application Servers & Tools category; On 11/19/05, Montserrat Mateos <mmateossa @ upsa.es> wrote: > Hi, I want configure my access log file for apache and I want that the log > file only save the client request (url) that he write in his navigator and > not other url that the server send as images that the url has. That's not literally possible, and not really a good idea anyway. It's not possible because each request looks completely independent from the server's perspective. You can look at the referer URL, but that doesn't guarantee anything. It's not a good idea because you are better off ...

Go Back   Application Development Forum > Application Servers & Tools > Apache

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-19-2005, 11:09 AM
Joshua Slive
Guest
 
Default Re: log file

On 11/19/05, Montserrat Mateos <mmateossa@upsa.es> wrote:

> Hi, I want configure my access log file for apache and I want that the log
> file only save the client request (url) that he write in his navigator and
> not other url that the server send as images that the url has.


That's not literally possible, and not really a good idea anyway.
It's not possible because each request looks completely independent
from the server's perspective. You can look at the referer URL, but
that doesn't guarantee anything. It's not a good idea because you are
better off recording complete logs and then using a log analysis
program to extract what you need.

But if what you are looking for is just to exclude .gif/.jpg/.css from
your logs entirely, you can do it using something like

SetEnvIf Request_URI \.(?i:gif|jpe?g|css)$ nolog
and then modify your Customlog line to look something like
CustomLog logs/access_log combined env=!nolog

Joshua.

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


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:06 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.