Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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