- 论坛徽章:
- 0
|
配置文件如下;
http_port *.*.*.*:80
acl StaticContent urlpath_regex "/usr/local/squid/etc/static_content"
no_cache deny !StaticContent
cache_mem 200 MB
cache_dir aufs /cahe 1024 16 256
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log /bak/log/squid/access.log combined
cache_log /bak/log/squid/cache.log
cache_store_log none
emulate_httpd_log on
useragent_log /bak/log/squid/useragent.log
referer_log /bak/log/squid/referer.log
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 525600 100% 525600 ignore-reload
acl purge_host src *.*.*.*/255.255.255.255
acl all src 0.0.0.0/0.0.0.0
acl picture urlpath_regex "/usr/local/squid/etc/picture"
acl picture1 url_regex "/usr/local/squid/etc/picture"
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl purge method PURGE
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow purge purge_host
http_access deny purge
http_access deny picture1
http_access allow all
http_reply_access allow all
icp_access allow all
cache_mgr webmaster
cache_effective_user support
cache_effective_group support
httpd_accel_host localhost
httpd_accel_port 80
httpd_accel_single_host on
httpd_accel_uses_host_header on
logfile_rotate 7
请问大家:
我用ip访问发现cache的内容能更新,但用域名访问就是更新不了,不知道问题出在哪里,最后我只能手动purge来清空cache内容来实现,希望得到大家支持,谢谢 |
|