人,因思则变。
Posts tagged 合并
Awstats 多個 log 的顯示方法
0一般大型網站的 Web Servre log 太大,通常會以 logrotate 將 log 分割成為數個檔案。
以 Apache 為例就是像:
access_log.1、access_log.2、access_log.3…以此類推
另外如果使用 Load balance ,也是會產生個 log 檔,但 awstats 預設的 LogFile 是只有一個,在多個 log file 的狀態下,變成無法更新至最新的狀態,這時就要使用 awstats 內建的工具logresolvemerge.pl 來合併 log ,其實用法也很簡單,只要更改網站的設定檔就好了,以本站為例就是編輯 /etc/awstats/awstats.neo.conf
找到 LogFile 的地方,原來預設單個 log 的設定如下:
LogFile=”/var/log/httpd/access_log”