Hi.

Following a message posted on the Apache users list, I am just curious if via mod_perl there could be a solution to the following issue :

A busy Apache server (with several VirtualHosts, why not ?) is being accessed from internal network clients (IP address 192.168.*) as well as by external clients (any other IPs). Among the internal clients are some GoogleBots, which generate thousands of accesses, all logged in the access logs of the hosts. These accesses come to generate more than 90% of the total, which really bothers the sysadmins when they have to scan any logfile for something else.

Would there be any way, using mod_perl, to detect such accesses early, and to either cancel the log phase for them, or else redirect the logging to some sink file, or else at least set some parameter so that the verbosity of the log for these accesses would be drastically reduced ? (Of course the requests themselves should just go through and still be handled properly)

Looking at the description of the PerlLogHandler at
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlLogHandler
I find thhe following paragraph, which tends to indicate that Apache log handlers will run anyway, but maybe there is still a devious solution ?

quote
First the handler tries to figure out what username the request is issued for, if it fails to match the URI, it simply returns Apache2::Const::DECLINED, letting other log handlers to do the logging. Though it could return Apache2::Const::OK since all other log handlers will be run anyway.
unquote

Thanks

Reply via email to