Skip to main content

Per domain Apache Error Logs?

Comments

6 comments

  • HostingH
    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
  • inspiredearth
    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
  • cPanelMichael
    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
  • inspiredearth
    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
  • inspiredearth
    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
  • cPanelMichael
    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.