星期三, 8月 19, 2009

Squid 執行狀態

Squid 本身提供一隻 cache manager 程式 cachemgr.cgi 撿查 Squid 的執行狀態,Squid安裝完後將它複製到 Apache 下的 cgi-bin 目錄,並需要再設定 squid.conf 及 cachemgr.conf 文件裡的配置:

/etc/squid/squid.conf
cachemgr_passwd yourpassword all #設定密碼
acl our_networks src 192.xxx.xxx.0/24 192.xxx.xxx.0/24
http_access allow manager our_networks #讓內網 PC 使用 cache manager
http_access deny manager #不許其它 PC 使用

/etc/squid/cachemgr.conf
加入一行 192.xxx.xxx.xxx #Squid 主機 IP

要察看Cache Manager提供的資訊時,可在瀏覽器位址列鍵入
http://伺服器的名稱或IP位址/cgi-bin/cachemgr.cgi

沒有留言: