How to disable access logs in apache via htaccess?

Go To StackoverFlow.com

6

I am working on a site and the client wishes users of the non-admin part of the site to be completely anonymous.

I don't know very much about apache, but is there some way to disable logging via the .htaccess file? (so that it can be portable with the site and not reliant on specific server settings)

I've found instructions for the httpd.conf, but I don't know how to replicate commenting out lines in a .htaccess file

2012-04-05 15:25
by Damon


6

Answer is big NO. You cannot control Apache logging from .htaccess unfortunately.

2012-04-05 15:26
by anubhava
That is great to know. The type of answer that tends not to come up through googl - Damon 2012-04-05 15:37
I was frantically trying to enable/disable RewriteLog for some misfiring rule but realized soon that no logging controls are allowed in .htaccess and probably for security reasons since .htaccess owners don't have write access to Apache log directory - anubhava 2012-04-05 15:40
is it possible to disable logging in the httpd.conf for only specific directories - Damon 2012-04-05 15:52
Yes I think that is possible, check this answer: http://serverfault.com/questions/119953/how-to-disable-apache-logging-when-accessing-certain-directorie - anubhava 2012-04-05 15:54
Ads