Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    132
    Likes Received:
    6
    Trophy Points:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. garconcn

    garconcn Well-Known Member

    Joined:
    Oct 29, 2009
    Messages:
    132
    Likes Received:
    6
    Trophy Points:
    68
    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:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice