LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache - remove specified IP from logs (https://www.linuxquestions.org/questions/linux-server-73/apache-remove-specified-ip-from-logs-772610/)

dlugasx 12-01-2009 02:52 AM

Apache - remove specified IP from logs
 
Hello everyone,

is it possible to configure Apache log, that specified IP will be excluded from access_log ?

thanks

Dlugasx

bathory 12-01-2009 03:11 AM

Yes it is.
Take a look at Conditional logs here

Regards

dlugasx 12-01-2009 03:41 AM

Thanks Batory :)

in did this part is responsible for removing specified IP`s from logs.

Quote:

# 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
Its working :). Finaly I will have nice statistics.


thanks again and one polish beer for You :)


dlugasx


All times are GMT -5. The time now is 12:23 PM.