Re: [help] Squid 設定問題

看板FreeBSD作者時間21年前 (2004/10/18 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
※ 引述《SuperLight.bbs@superlight.twbbs.org (bad.....)》之銘言: > ※ 引述《ofather.bbs@bbs.csie.ncu.edu.tw (老爹)》之銘言: > > 請問一下,如何依照來源 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. <gslin@ccreader.nctu.edu.tw> -- ※ Origin: 邪惡小鹿鹿 <Deer.twbbs.org> ◆ From: deer.math.nctu.edu.tw
文章代碼(AID): #11SvHU00 (FreeBSD)
文章代碼(AID): #11SvHU00 (FreeBSD)