Per domain Apache Error Logs?
Hi there,
I am trying to troubleshoot some issues on a WHM/Cpanel server (CentOS 6.9). As far as I can tell, all Apache error logging ends up in /usr/local/apache/logs/error_log.
The errors make no reference to which domain was responsible, so it makes it rather hard to do certain tests (one domain is a staging replica site on which I can do tests, the other is the live site).
Are there any domain/site level Apache error logs I am over looking? If not... Is there a way to have the log entries state which domain the error was caused on?
Thanks...
-
Hello, To find the exact domain's or user's apache logs, just try to tail -f /usr/local/apache/logs/error_log | grep username and hit the url then you will see the logs for that user or domain. 0 -
Hello, To find the exact domain's or user's apache logs, just try to tail -f /usr/local/apache/logs/error_log | grep username and hit the url then you will see the logs for that user or domain.
Thanks for assisting. I had tried that previously, but the errors I am trying to troubleshoot don't have a path or username associated with them. For example,[Sun Mar 11 21:37:07.770651 2018] [core:error] [pid 19671:tid 140259755009792] [client SERVERIP:44272] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
That's why I got stuck.0 -
Hello, You could add an "ErrorLog" entry to the VirtualHost of each account so that it logs to a separate location: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Thank you. 0 -
Hello, You could add an "ErrorLog" entry to the VirtualHost of each account so that it logs to a separate location: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Thank you.
Great. Thank you. That's exactly what I'd like to do. Cheers...0 -
I notice in the httpd.conf file, it has the following two lines in each vhost section... # To customize this VirtualHost use an include file at the following location # Include "/etc/apache2/conf.d/userdata/std/2_4/USERNAME/DOMAIN.COM/*.conf"
(NB. I replaced username and domain with placeholders) Should the second line NOT be commented out? Otherwise, where's the include declaration for that file?0 -
Hello, Directly modifying the httpd.conf file isn't supported. Instead, you'd simply follow the instructions at: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation There's no need to edit the httpd.conf to reference the include files, as it's setup to automatically detect those custom include files. Simply run the following commands after creating the custom include files according to the instructions in the document: /usr/local/cpanel/scripts/ensure_vhost_includes --all-users /scripts/rebuildhttpdconf
Thank you.0
Please sign in to leave a comment.
Comments
6 comments