2011年8月1日 星期一

Apache使用Cronolog

參考:http://www.ylmf.net/linux/tips/2010111710026.html

安裝Cronolog:
  1. wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
  2. gzip -d cronolog-1.6.2.tar.gz
  3. tar xf cronolog-1.6.2.tar
  4. cd cronolog-1.6.2
  5. ls
  6. ./configure
  7. make
  8. make install
  9. which cronolog
which cronolog會看到被安裝在 /usr/local/sbin/cronolog
CustomLog "| /usr/local/sbin/cronolog /[PATH_TO_YOUR_LOG]/access-%Y%m%d.log" combined
 <VirtualHost *:80>
  ServerName ......
  DocumentRoot ......
  <Directory /Users/cateyes/work/sites/>
    ......
  </Directory>
  CustomLog "| /usr/local/sbin/cronolog /[PATH_TO_YOUR_LOG]/access-%Y%m%d.log" combined
</VirtualHost>

沒有留言:

張貼留言