View Full Version : Apache logging question
01-25-2003, 12:21 PM
Can I config apache to not log certain IPs? I connect to my http server the most of anyone, and I want to see what everyone else is doing, not myself.
01-25-2003, 07:34 PM
This link gives you the info you need: http://httpd.apache.org/docs/logs.html
Here's the important stuff
There are times when it is convenient to exclude certain entries from the access logs based on characteristics of the client request. This is easily accomplished with the help of environment variables. First, an environment variable must be set to indicate that the request meets certain conditions. This is usually accomplished with SetEnvIf. Then the env= clause of the CustomLog directive is used to include or exclude requests where the environment variable is set. Some examples:
# Mark requests from the loop-back interface
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
# Mark requests for the robots.txt file
SetEnvIf Request_URI "^/robots\.txt$" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog
01-26-2003, 12:10 AM
I put that into my conf file, but it didnt seem to work? Should I be placing the text in a specific area of the log file?
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.