• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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