分类: LINUX
2008-11-23 15:23:41
http_port 80 改为
http_port 80 vhost
cache_access_log … 改为
access_log …
no_cache …改为
cache …
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
删除
改为(根据具体情况定义acl 设置转发)
acl ipcndm dstdomain .ipcn.org
cache_peer parent 80 0 originserver
cache_peer_access allow ipcndm
cache_peer_access deny all
always_direct allow !ipcndm
never_direct allow ipcndm
其他还有很多
比如:不记图片类访问日志
acl nolog urlpath_regex \\.gif \\.jpg \\.css \\.js \\.swf
access_log /data/squid/var/logs/access.log common !nolog
squid.conf 配置官方参数相关改动说明:
1. http_port加参数
a) http_port 80 vhost
2. cache_peer hostname type http_port icp_port [options]
a) originserver
b) sourcehash
c) name=xxx 加速同一机器时不同端口时定位用
3. no_cache 改为 cache
a) cache deny QUERY
4. cache_vary on
a) Set to off to disable caching of Vary:in objects.
5. broken_vary_encoding 不要相信 ETag 因为有gzip
a) acl apache rep_header Server ^Apache
b) broken_vary_encoding allow apache
6. logformat
a)
b)
c)
d) 下面是squid默认提供的
e) #logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %
7. access_log
a) cache_access_log改为access_log
b) access_log
8. check_hostnames on
9. allow_underscore on
10. refresh_pattern 增加
a) ignore-no-cache
b) ignore-private
c) ignore-auth
11. collapsed_forwarding off
12. refresh_stale_hit 0 seconds
13. follow_x_forwarded_for deny all
14. acl_uses_indirect_client on
15. log_uses_indirect_client on
16. log_access allow|deny acl acl…
17. httpd_suppress_version_string off
18. httpd_accel_host删除
19. httpd_accel_port删除
20. httpd_accel_single_host删除
21. httpd_accel_with_proxy删除
22. httpd_accel_uses_host_header删除
23. error_map 404
24. via on