- 论坛徽章:
- 0
|
本帖最后由 cfanbo 于 2011-07-26 15:07 编辑
[root@bogon bin]# ./squidclient -p 80 -m PURGE http://bbs.abc.com/index.htm- HTTP/1.0 403 Forbidden
- Server: squid/3.0.STABLE25
- Mime-Version: 1.0
- Date: Fri, 22 Jul 2011 16:30:44 GMT
- Content-Type: text/html
- Content-Length: 1472
- X-Squid-Error: ERR_ACCESS_DENIED 0
- X-Cache: MISS from cnc12.34.56.78
- Via: 1.0 cnc12.34.56.78 (squid/3.0.STABLE25)
- Connection: close
复制代码 squid.conf配置:- #Default:
- # windows_ipaddrchangemonitor on
- visible_hostname cnc12.34.56.78
- cache_mgr webmaster@abc.com
- http_port 80 vhost vport
- cache_mem 256 MB
- maximum_object_size_in_memory 2 MB
- memory_replacement_policy lru
- cache_dir ufs /usr/local/squid/var/cache 512 16 256
- max_open_disk_fds 0
- minimum_object_size 0 KB
- maximum_object_size 120 KB
- cache_swap_low 80
- cache_swap_high 97
- cache_store_log none
- cache_peer 192.168.0.90 parent 81 0 no-query no-digest originserver name=blog
- cache_peer 192.168.0.90 parent 81 0 no-query no-digest originserver name=bbs
- cache_peer_domain blog blog.abc.com
- cache_peer_domain bbs bbs.abc.com
- cache_peer_access blog allow all
- cache_peer_access bbs allow all
- [color=Blue]acl Purge method PURGE
- http_access allow Purge localhost[/color]
- http_access allow all
- cache_effective_user squid
- cache_effective_group squid
- httpd_suppress_version_string off
复制代码 /etc/host文件加了一条信息
192.168.0.90 bbs.abc.com
按照http://docs.haohtml.com/Squid/chap07.html#a6但要的方法加上- acl AdminBoxes src 127.0.0.1 172.16.0.1 192.168.0.1
- acl Purge method PURGE
- http_access allow AdminBoxes Purge
- http_access deny Purge
复制代码 试了也不行
已经解决:- [root@bogon bin]# ./squidclient -m PURGE -h 192.168.0.90 -p 80 http://bbs.abc.com
- HTTP/1.0 404 Not Found
- Server: squid/3.0.STABLE25
- Mime-Version: 1.0
- Date: Fri, 22 Jul 2011 19:45:06 GMT
- Content-Length: 0
- X-Cache: MISS from cnc12.34.56.78
- Via: 1.0 cnc12.34.56.78 (squid/3.0.STABLE25)
- Connection: close
复制代码 原来指定的时候用了127.0.0.1,换成192.168.0.90可以了,但不清楚为什么127.0.0.1不可以的,难道和cache_peer后面的ip有一定的关系吗? |
|