- 論壇徽章:
- 0
|
最近碰到個(gè)奇怪的問(wèn)題,我利用squid(centos4自帶的2.5版本)訪(fǎng)問(wèn)讀秀網(wǎng)站,搜索什么都正常,但一點(diǎn)擊具體內(nèi)容,就顯示不出來(lái)了,提示無(wú)法顯示頁(yè)面。但出錯(cuò)頁(yè)面并不是squid的,而是ie本身自帶的,就像是繞過(guò)了squid一樣。
先附上測(cè)試鏈接,我這是學(xué)校試用的,不知道外網(wǎng)能否訪(fǎng)問(wèn):
http://qw.duxiu.com/goRead.jsp?k ... Number=000000661940
我用抓包工具看了一下,如果是正常的話(huà),上面的測(cè)試連接應(yīng)該跳轉(zhuǎn)到一個(gè)正常的顯示頁(yè)面,出現(xiàn)如下數(shù)據(jù)包:
協(xié)議:TCP 源IP:192.168.0.1 源端口:3128 目的IP:192.168.0.134 目的端口:1833 TTL長(zhǎng)度:64 數(shù)據(jù)大。749
數(shù)據(jù)內(nèi)容:HTTP/1.0 302 Moved Temporarily Date: Thu, 22 May 2008 02:49:51 GMT Server: Apache/2.0.61 (Unix) mod_jk/1.2.25 Location: http://img.ssreader.com/DsrPath? ... nlei%3D0T0P30102000 Vary: Accept-Encoding Content-Encoding: gzip Content-Type: text/html;charset=GBK X-Cache: MISS from www.edu.duxiu.com Via: 1.0 www.edu.duxiu.com:80 (squid/2.6.STABLE17) X-Cache: MISS from liblinux.com Proxy-Connection: close ?
但如果掛上代理,則出現(xiàn)如下數(shù)據(jù)包,url被改寫(xiě)了:
協(xié)議:TCP 源IP:210.36.246.54 源端口:3128 目的IP:192.168.0.134 目的端口:1839 TTL長(zhǎng)度:63 數(shù)據(jù)大小:794
數(shù)據(jù)內(nèi)容:HTTP/1.0 302 Moved Temporarily Date: Thu, 22 May 2008 02:50:39 GMT Server: Apache/2.0.61 (Unix) mod_jk/1.2.25 Location: http://img.168.0.1:3128 (squid/2.5.STABLE6), 1.0 www.edu.ssreader.com/DsrPath?kid ... nlei%3D0T0P30102000 Vary: Accept-Encoding Content-Encoding: gzip Content-Type: text/html;charset=GBK X-Cache: MISS from www.edu.duxiu.com Via: 1.0 www.edu.duxiu.com:80 (squid/2.6.STABLE17) X-Cache: MISS from 192.168.0.1 Proxy-Connection: close ?
從上面可以觀(guān)察到,本來(lái)應(yīng)該正常跳轉(zhuǎn)到http://img.ssreader.com/的頁(yè)面,卻被改為了http://img.168.0.1:3128,導(dǎo)致無(wú)法訪(fǎng)問(wèn)。
研究了兩天,終于發(fā)現(xiàn)原來(lái)是visible_hostname參數(shù)的問(wèn)題,如果把該參數(shù)去掉,就正常了。我用了那么久squid,還是第一次發(fā)現(xiàn)這個(gè)問(wèn)題,不知為什么? |
|