: Using SetEnvIf to not log overly accessed URLs I'm trying to figure out how to craft my SetEnvIf's in my apache config so that the server hard disk isn't spinning 24/7 over log entries. What
I'm trying to figure out how to craft my SetEnvIf's in my apache config so that the server hard disk isn't spinning 24/7 over log entries.
What I want to do is disable logging for all domains and subdomains the server has DNS records for, however, on the example.com domain, I want it where requests to the root (a.k.a. example.com/) not be logged since that's frequently accessed.
This is what I have so far as httpd.conf code but I'm not sure how to modify it to satisfy my criteria above.
SetEnvIf Host "^example.com$" nolog
SetEnvIf Request_URI !/ !nolog
SetEnvIf Host "^???$" nolog
CustomLog /var/log/httpd/access_log common env=!nolog
Later I may think about no longer logging PHP file access as I don't want potential hackers to flood my log files anymore.
How do I adjust my code to satisfy my requirements?
More posts by @Annie201
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.