tripstar1976 Posted September 7, 2006 Share Posted September 7, 2006 HiIs there any way to stop internal/network ips from being logged?Thanks Quote Link to comment Share on other sites More sharing options...
R_P Posted September 7, 2006 Share Posted September 7, 2006 Yep, the buzz words you need to search for here are: conditional logging in apache. Here's a great reference. It uses apache mod_setenvif by the way:http://www.serverwatch.com/tutorials/article.php/10825_3376671_2Assuming that internal IP's will be of the 192.168.xxx.xxx type, I believe something like this would work:[code]SetEnvIf Remote_Addr ^192\.168\. internal_IPCustomLog logs/access.log combined env=!internal_IP[/code]What this basically does is instanciate an "internal_IP" environmental rule if the IP starts with "192.168." which is then evaluated after the custom log directive. If internal_IP exists, it will suppress logging. I actually do this with a number of my scripts called by AJAX. Comes in pretty handy.Have fun. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.