I have a setup where heartbeat is grabbing a website every couple seconds. I would like to filter out these entries from the Access Logs.

Are there any apache directive or modules that will make so I can keep these entries from ever being written to the log in the first place?

link|improve this question

78% accept rate
feedback

2 Answers

up vote 4 down vote accepted

Yup, use SetEnvIf along with CustomLog

e.g.

## Ignore anything from 127.0.0.1
SetEnvIf Remote_Addr "127\.0\.0\.1" nolog
CustomLog logs/access_log common env=!nolog
link|improve this answer
feedback

Looks like I might want 'Piped Logs'.

Although if anyone has a better solution, or any caveats to watch out for when using that, I would appreciate that. The major caveat mentioned on ths site I see is:

"Piped log processes are spawned by the parent Apache httpd process, and inherit the userid of that process. This means that piped log programs usually run as root. It is therefore very important to keep the programs simple and secure."

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.