inspiredearth

Member
Dec 1, 2015
19
2
3
New Zealand
cPanel Access Level
Reseller Owner
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...
 

HostingH

Well-Known Member
Jan 13, 2008
125
17
68
cPanel Access Level
Root Administrator
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.
 

inspiredearth

Member
Dec 1, 2015
19
2
3
New Zealand
cPanel Access Level
Reseller Owner
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,
Code:
  [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.
 

inspiredearth

Member
Dec 1, 2015
19
2
3
New Zealand
cPanel Access Level
Reseller Owner
I notice in the httpd.conf file, it has the following two lines in each vhost section...

Code:
 # 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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
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:

Code:
 /usr/local/cpanel/scripts/ensure_vhost_includes --all-users
/scripts/rebuildhttpdconf
Thank you.