- 论坛徽章:
- 0
|
使用squid配置了一个web加速反响代理服务器,对3个域名进行cache,测试过程中有2个要求无法实现:
一。日志管理。3个域名的访问日志都集中在access.log 中,可否按照域名和时间使产生的日志分开,
比如 abcaccess10102006.log defaccess10102006.log
,squid是否有这样的功能呢,或者是否要借助其他软件呢,我尝试过sarg,它只能产生报告,无法自动的产生日志。
另外我希望产生这样日志的目的在于统计每个域名的page view 数和用户数。
二。cache的管理。我加速的3个域名都是静态页面 (html htm) 所以我无需对每个域名下所有的文件进行定时刷新 ,只需要对特定的页面进行cache刷新,
比如 www.abc.com/index.htm www.def.com/index3.htm ,请问能否实现,如何配置,谢谢!
贴出我的squid.conf
# visible name
visible_hostname cache.example.com
# cache config: space use 1G and memory use 256M
cache_dir ufs /usr/local/squid/cache 1024 16 256
cache_mem 256 MB
cache_effective_user squid
cache_effective_group squid
http_port 80
httpd_accel_host virtual
httpd_accel_single_host off
httpd_accel_port 80
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
# accelerater my domain only
acl acceleratedHostA dstdomain www.abc.com
acl acceleratedHostB dstdomain www.def.com
acl acceleratedHostC dstdomain www.ghi.com
# accelerater http protocol on port 80
acl acceleratedProtocol protocol HTTP
acl acceleratedPort port 80
# access arc
acl all src 0.0.0.0/0.0.0.0
# Allow requests when they are to the accelerated machine AND to the
# right port with right protocol
http_access allow acceleratedProtocol acceleratedPort acceleratedHostA
http_access allow acceleratedProtocol acceleratedPort acceleratedHostB
http_access allow acceleratedProtocol acceleratedPort acceleratedHostC
# logging
emulate_httpd_log on
cache_store_log none
# manager
acl manager proto cache_object
http_access allow manager all
http_access allow all
http_reply_access allow all
icp_access allow all
cachemgr_passwd pass all
[ 本帖最后由 summerstone 于 2006-8-16 10:07 编辑 ] |
|