Support Center > Knowledgebase > DirectAdmin > Apache Related Information > Prevent apache logging of certain requests
Prevent apache logging of certain requests
If you have a common request that might be filling up your logs or you simply don't wish to see it (knowing it may skew your web stats), then you can tell Apache not to log it by doing:
Create/etc/httpd/conf/extra/dontlog.conf
and add the codeCustomLog /var/log/httpd/domains/directadmin.com.log combined env=!dontlog
In your /etc/httpd/conf/extra/httpd-includes.conf, add this code:Include /etc/httpd/conf/extra/dontlog.conf
Lastly, for any site where you wish to disable the request of a given file, let's call it:
You could go to:Admin Level -> Custom Httpd Config -> domain.com
and in the top CUSTOM textarea, add:SetEnvIf Request_URI "^/commonfile.txt " dontlog
|?COMBINED_LOG=combined env=!dontlog|
This uses the following DA feature:
http://www.directadmin.com/features.php?id=1712
Also Read