Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2004
    Posts
    5

    Exclamation how to stop apache from writting to error_log

    Hi,

    Traffic has increased on website on Cpanel/Apache enterprise box. Due to a scipt the apache error log is increasing in size rapidly.

    As this script is vital for business I can't just disable it. However the error log rapidly goes to 2GB and apache drops.

    Is there a way to stop temporarily apache from writting errors to the error_log (i.e. just discard the errors) until I fix the script? Is there a way to do it in WHM? If not how do I do it? Will this break cpanel?

    Please help!!!! Thank you!!!!!

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    You could try by simply commenting out the ErrorLog line in httpd.conf or pointing it to /dev/null

    If that doesn't work, you could try clearing out the error_log in situ via a cron job, though this is definitely not recommended (i.e. you should fix the script) runs once an hour:

    0 * * * * cat /dev/null > /usr/local/apache/logs/error_log
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Jun 2004
    Posts
    5

    Default

    Hi chirpy thanks for the reply! Sorry for my "duftness"... which line do I have to comment out and how do I do it?

  4. #4
    Member
    Join Date
    Mar 2005
    Posts
    49

    Default

    edit /usr/local/apache/conf/httpd.conf

    find the line

    ErrorLog /usr/local/apache/logs/error_log

    then change to

    #ErrorLog /usr/local/apache/logs/error_log

    service httpd restart | graceful | stop | start

  5. #5
    Member
    Join Date
    Jun 2004
    Posts
    5

    Default

    This is weird the log file that is getting big in size and creating the problem is:

    /etc/httpd/logs/error_log

    But there is no mention of it in httpd.conf?

  6. #6
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    That's the same file as /usr/local/apache/logs/error_log. /etc/httpd is a symlink to /usr/local/apache
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Strange output in Apache error_log
    By tomp_gl in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-21-2009, 10:05 PM
  2. Attacks agains Apache in error_log
    By carock in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-28-2006, 09:14 AM
  3. Looking for a 'fix' for my apache / php error_log
    By spaceman in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-15-2006, 04:08 AM
  4. Apache error_log
    By minasonline in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-09-2003, 07:48 AM
  5. Apache (error_log)
    By minasonline in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-05-2003, 12:00 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube