Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Per domain Apache Error Logs?

Discussion in 'EasyApache' started by inspiredearth, Mar 11, 2018.

  1. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    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...
     
  2. HostingH

    HostingH Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    123
    Likes Received:
    17
    Trophy Points:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    New Zealand
    cPanel Access Level:
    Reseller Owner
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    New Zealand
    cPanel Access Level:
    Reseller Owner
  6. inspiredearth

    inspiredearth Member

    Joined:
    Dec 1, 2015
    Messages:
    19
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    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?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice