squid經常使用命令:
/usr/local/squid/sbin/squid -z 初始化緩存空間
/usr/local/squid/sbin/squid 啓動
/usr/local/squid/sbin/squid -k shutdown 中止
/usr/local/squid/sbin/squid -k reconfigure 從新載入配置文件
/usr/local/squid/sbin/squid -k rotate 輪循日誌
#acl all src 0.0.0.0/0.0.0.0 and http_access allow all選項定義了一個訪問控制列表。詳細狀況參見和Squid軟件
#攜帶的文檔。這裏的訪問控制列表容許全部對代理服務的訪問,由於這裏該代理是加速web服務器。
acl all src 0.0.0.0/0.0.0.0
acl manager proto http
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.1
acl Safe_ports port 80
acl CONNECT method CONNECT
http_access allow all
http_reply_access allow all
acl OverConnLimit maxconn 16
http_access deny OverConnLimit
icp_access deny all
miss_access allow all
ident_lookup_access deny all
http_port 8080 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
cache_mem 1 GB
fqdncache_size 1024
maximum_object_size_in_memory 2 MB
memory_replacement_policy heap LFUDA
cache_replacement_policy heap LFUDA
cache_dir ufs /home/cache 5000 32 512
#32個一級目錄,512個二級目錄
max_open_disk_fds 0
minimum_object_size 1 KB
maximum_object_size 20 MB