• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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