• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Question tell apache to not log certain requests

Maris

Basic Pleskian
Hello, how to tell apache not to log certain requests in log files ?
Could you please provide step by step instrucitions?

Things i've already tried:
1) added into .htaccess two lines:
AllowOverride FileInfo
SetEnvIf Request_URI ".*" dontlog

2) then there should be added something like this env=!dontlog at the end of CustomLog line in some .conf file in vhosts. I think I pretty added in every possible .conf file which have CustomLog line in /var/vhosts/system, even created two files vhost.conf and vhost_ssl.conf with these lines.. but at this point i am not sure i know what i am doing..

Then restarted httpd, and it still logs every request.

Would someone please walk me step by step with things i have to do? Thanks
 
I had similar question, maybe it helps to reduce de disk IO and load average, domain logs are writing twice, one on /var/www/vhosts/system/domain/log and also in /var/www/vhosts/domain/log maybe it can help if logs only POST requests
 
Problem currently is that .htaccess is not for some reason able to set an env variable. Somewhere I've red that it requires mod_env module in apache. But seems that this module is included in Plesk by default, though I am not sure - it is in one file that apache httpd.conf is including, but then in Plesk - this module is not visible from Tools&Settings -> Apache Web Server.

If all the rules you drastically put in /var/vhost/system httpd.conf file - till some magic moment when Plesk is overwriting the files - not logging kind of worked for me. But ideally I would love to do it with .htaccess

Can somebody enlighten us?
 
Back
Top