You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <js...@gmail.com> on 2005/11/19 17:09:41 UTC

Re: [users@httpd] log file

On 11/19/05, Montserrat Mateos <mm...@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