Re: [help] Squid 設定問題
※ 引述《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
討論串 (同標題文章)
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章