The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'EasyApache' started by garconcn, Jun 2, 2014.

  1. garconcn

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    8
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. garconcn

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    98
    Likes Received:
    1
    Trophy Points:
    8
    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"
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page