Skip to main content

error_logs per domain

Comments

11 comments

  • madmanmachines
    Hi, Typically the errors provide enough information to determine the account/domain, but there are a few that do not. You can also configure a local error log using the 'error_log' directive. How you implement this will be dependent on your PHP handler. If using suPHP, you may add the directive to your local 'php.ini' file. If you do not have one, you may create one. If using DSO you'll need to implement this through a '.htaccess' file with the the PHP directives prepended by 'php_val' or 'php_flag'. You can determine your PHP handler at WHM > Service Configuration > Configure PHP and suEXEC or with the command below from the root user:
    /usr/local/cpanel/bin/rebuild_phpconf --current
    Thanks,
    0
  • ravijas
    Hi, If php-SUEXEC enabled then just use "tail -f /usr/local/apache/logs/error_logs | grep username" username=replace with actual username. Thanks, Ravijas
    0
  • maqsium
    Hi, I'm using mod_fcgid with apache and suEXEC on Apache. My apache does not generate any domain/user specific application, it always gives PID and IP in each error, thats all. Nothing more than that, IP is simply my server's IP. I have 13 websites running on it and can't figure out which website is giving error.
    0
  • madmanmachines
    Hi, Try temporarily switching to suPHP and then monitor logs. Thanks,
    0
  • maqsium
    Its live server with huge traffic, it is not possible to move from mod_fcgid. Any other alternates?
    0
  • madmanmachines
    I think that may be your best option. You can go back to the idea of a custom local PHP error log. You could also try a while loop that parses the Apache error log for these errors against lsof/netstat. You could also try manually running each page from the command line. fcgi by default just does not provide very verbose logging.
    0
  • cPanelMichael
    Hello, The username of the account is typically present in the global /usr/local/apache/logs/error_log file. Could you provide an example of an entry that you can not determine the cause of? Thank you.
    0
  • maqsium
    Here are few logs, I just see the IP of the my server. FYI, I'm using MPM Worker with mod_fcgid running wordpress sites. [Fri Apr 17 01:46:13.627246 2015] [fcgid:warn] [pid 31495:tid 139687846950656] [client xxx.xxx.xxx.xx:37962] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5 [Fri Apr 17 01:46:13.894606 2015] [fcgid:warn] [pid 31495:tid 139687469315840] [client xxx.xxx.xxx.xx:38138] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5 [Fri Apr 17 01:46:13.935566 2015] [fcgid:warn] [pid 31678:tid 139687700092672] [client xxx.xxx.xxx.xx:37963] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5 [Fri Apr 17 01:46:14.083410 2015] [fcgid:warn] [pid 31980:tid 139687794501376] [client xxx.xxx.xxx.xx:38139] mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5,
    0
  • cPanelMichael
    Hello, The following third-party URL should help address those errors:
    0
  • maqsium
    Micheal, I think you referring to the problem given in the log, rather, I would like to see which website/user is having those error. My objective is to show the website/username in the error log.
    0
  • cPanelMichael
    You could add an "ErrorLog" entry to the VirtualHost of each account as documented here: However, note that some errors are global and for the Apache service itself. Thank you.
    0

Please sign in to leave a comment.