Apache error_log is in /var/log/messages file instead of /usr/local/apache/logs/error_log

garconcn

Well-Known Member
Oct 29, 2009
157
12
68
Hi,

On one of our server, the apache error log was logged in to the /var/log/messages file instead of default location /usr/local/apache/logs/error_log. Before, we use rsyslog to send the Apache error log to remote syslog server, then this log was starting to log into /var/log/messages file. I had removed this confg and restarted rsyslog/httpd services on several servers, only one server still send log to the /var/log/messages file. Those servers are using cloudlinux, most of the settings are identical. Any idea?

===/var/log/messages===
Jun 2 17:02:43 host httpd[558047]: [:error] [pid 558047] [client xxx.xxx.xxx.xxx:44350] File does not exist: /home/user/public_html/xmlrpc.php
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

Are you using any third-party web servers on this system? Please post the output from:

Code:
grep ErrorLog /usr/local/apache/conf/httpd.conf
Thank you.
 

garconcn

Well-Known Member
Oct 29, 2009
157
12
68
Hello :)

Are you using any third-party web servers on this system? Please post the output from:

Code:
grep ErrorLog /usr/local/apache/conf/httpd.conf
Thank you.
No 3rd-party web servers on this system.

You are right, the errorlog was redirected to syslog in the httpd.conf. I might forgot I made the change before. Thank you.

ErrorLog "logs/error_log"
#ErrorLog "syslog:local5"
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Remember to distill the changes after reverting back to the default value. To check whether your changes will be saved, use the /scripts/rebuildhttpdconf script to rebuild the httpd.conf file.

Thank you.