maqsium

Member
Mar 27, 2015
14
0
1
India
cPanel Access Level
Root Administrator
Hi,

I have dedicated server and have 13 busy sites running on it. I would like to know how can I see error_logs specific to domain?

At the moment, I see all errors in /usr/local/apache/logs/error_logs
But it is very difficult to identify which application/user is throwing these errors.
 

madmanmachines

Well-Known Member
Nov 28, 2014
94
4
8
cPanel Access Level
Root Administrator
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:
Code:
/usr/local/cpanel/bin/rebuild_phpconf --current
Thanks,
 

ravijas

Member
Jul 24, 2014
13
1
3
cPanel Access Level
Root Administrator
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
 

maqsium

Member
Mar 27, 2015
14
0
1
India
cPanel Access Level
Root Administrator
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.
 

madmanmachines

Well-Known Member
Nov 28, 2014
94
4
8
cPanel Access Level
Root Administrator
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.
 

cPanelMichael

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

maqsium

Member
Mar 27, 2015
14
0
1
India
cPanel Access Level
Root Administrator
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,
 

maqsium

Member
Mar 27, 2015
14
0
1
India
cPanel Access Level
Root Administrator
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.