The file named error_log is too large
The file named errorlog is too large
1 Problem
One day, when I install android-sdk, I found that one error "NO space left on the device". That's very strange. Because I have allocated 50G to mnt. So I check my computer's files. Then I found the file,*errorlog.1*, which size is 35G. Then search. The errorlog.1 is the error log file of apache. All apache errors/diagnostic information or other errors found during serving requests are logged to this file. So if you don't do something, it will be larger and larger.
2 Solution
edit /etc/httpd/conf/httpd.conf
#ErrorLog "/var/log/httpd/error_log" #before ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M" #CustomLog "/var/log/httpd/access_log" common #before CustomLog "|bin/rotatelogs /var/log/httpd/access_log 86400" common CustomLog "|bin/rotatelogs /var/log/httpd/access_log 5M" common