看板FreeBSD
标 题Re: [help] Squid 设定问题
发信站小鹿鹿 BBS (Mon Oct 18 17:47:18 2004)
转信站ptt!ctu-reader!news.nctu!abpe.org
※ 引述《[email protected] (bad.....)》之铭言:
> ※ 引述《[email protected] (老爹)》之铭言:
> > 请问一下,如何依照来源 IP 不同,将目的地网页导向到不同地方
> > target: http://www.target.com/
> > forward: http://www.target1.com/
> > http://www.target2.com/
> > source: A, 192.168.1.1
> > B, 192.168.1.2
> > when A connect target, It will forward to http://www.target1.com/
> > when B connect target, It will forward to http://www.target2.com/
> > 谢谢
> 使用 acl 设定,用 google 查一下 squid.conf,有很多范例
> ex:
> acl src_A dst 192.168.1.1
> acl src_B dst 192.168.1.2
事情没有这麽简单,这看起来像是 load sharing 但是又要避免 session 丢到
不同台。
事实上同一个 user 不保证由同一个 IP source 近来,这也是国外很多网站
不敢 (也「不能」) 直接限制这麽严格的原因之一。
如果发问者要用在亚卓市上,我建议直接买专门的 cache server 跑 load
sharing by cookies 比较快。
不然就直接 DNS round-robin 加上 NFS 或是 memcached 放 session。
squid 目前没有这些功能,要上 patch,以前试着找过没找到。
--
Resistance is futile.
<
[email protected]>
--
※ Origin: 邪恶小鹿鹿 <Deer.twbbs.org> ◆ From: deer.math.nctu.edu.tw