How to specify Apache loglevel in CPanel
I want to change my Apache log level to: LogLevel warn access_compat:crit
There is a drop-down box in WHM to set it to warn, but without an option to add anything else.
Where / how can I configure a detailed log level?
-
Hey there! We have details on how to adjust this value here:
https://support.cpanel.net/hc/en-us/articles/4420690869143-How-do-I-change-the-log-level-of-Apache
Let me know if that helps!
0 -
Where do I put "access_compat:crit"?
0 -
I'm not sure - can you let me know the specific change you're trying to make?
0 -
I don't want to log AH01797 errors (client denied by server configuration)
0 -
I'm not finding a good way to do this. I'm guessing you also found this article at https://serverfault.com/questions/402989/how-to-hide-client-denied-by-server-configuration-error-in-log but cPanel doesn't include that module.
However, if we check the Apache documentation we'll find this page:
https://httpd.apache.org/docs/2.4/mod/mod_access_compat.html
"Available in Apache HTTP Server 2.3 as a compatibility module with previous versions of Apache httpd 2.x. The directives provided by this module have been deprecated by the new authz refactoring. Please see
mod_authz_host
"which takes us here:
https://httpd.apache.org/docs/2.4/mod/mod_authz_host.html
cPanel does include mod_authz so maybe you could find a way using that information?
Is there a specific problem with the log entries on the system? Is this just appearing so often that it is making the logs large? I checked my personal machine which is very log traffic, and even I have over 450,000 entries for that error, most of which are just bots checking for random files.
0 -
Yes, I found that same article.
About -just a random guess- 90% of all errors in the log are AH01797. That makes it really hard to find errors that do matter.
Wondering... is that error somewhere as a Variable? The reason I'm asking is this: https://serverfault.com/questions/91152/filter-entries-from-going-into-apache-logs
SetEnvIf Remote_Addr "127\.0\.0\.1" nolog CustomLog logs/access_log common env=!nolog
That would allow to not log AH01797 if there's a way to check that.
0 -
I'm not familiar with that error being related to a variable, no.
0 -
Not related to, but being able to be filtered with. The example would allow to not log that error if there's any environment variable set to allow doing so.
0 -
Not that I am aware of.
0 -
Thank you anyway.
0
Please sign in to leave a comment.
Comments
10 comments