Oct 10

Log Rotate for Apache

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Apache will lock the log file and syslog also cannot rotate it.
so we need a program cronolog
1. download most update version from http://cronolog.org/
2. unzip the file
3. ./configure
4. make
5. make install
6. configure the apache
CustomLog “|/usr/sbin/cronolog /var/www/logs/domain.com-access_log.%Y%m%d” common
ErrorLog “|/usr/sbin/cronolog /var/www/logs/domain.com-error_log.%Y%m%d”
7. restart apache
8. Done


Written by 傻仔仔

光波24書網(http://www.24reader.com/) - 免費電子書

  

光波24書網(http://www.24reader.com/) - 新到電子書

  

光波24書網(http://www.24reader.com/) - 快將推出電子書