wangwen wrote:
----- Original Message ----- From: "Amos Jeffries" <squ...@treenet.co.nz>
To: "wangwen" <wangw...@126.com>
Cc: <squid-users@squid-cache.org>
Sent: Tuesday, September 29, 2009 12:51 PM
Subject: Re: [squid-users] squid vport
Thanks for your help!
I think it should have been: "Host: 192.168.0.164:88" maybe something
went
wrong and caused defaultsite to be used. Henrik might know.
Sorry, I made a mistake. Host is the 192.168.24.198:88.
So Squid check the URL. Finds /rdims/index.jsp.
... checks the Host: header. Finds 192.168.0.164:88, making
URL=http://192.168.0.164:88/rdims/index.jsp
... checks the Host: header port. Finds 88, making
URL=http://192.168.0.164:88/rdims/index.jsp
... has a domain '192.168.0.164', so skips defaultsite
And passes on:
GET /rdims/index.jsp HTTP/1.0
Host: 192.168.0.164:88
alter HTTP_Port as follow:
http_port 192.168.0.164:88 accel vhost defaultsite=192.168.24.198
When Clients access http://192.168.0.164:88/rdims/index.jsp
HTTP request header which Squid sent to backend server is:
GET /rdims/index.jsp HTTP/1.0
Accept: */*
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;
SLCC1;.NETCLR 2.0.50727; InfoPath.1; .NET CLR 3.5.30729; .NET CLR
3.0.30618)
Host: 192.168.24.198
Via: 1.1 szrd.com:88 (squid/2.6.STABLE21)
X-Forwarded-For: 192.168.12.48
Cache-Control: max-age=259200
Connection: keep-alive
Now i did not use vport.
Above you said that the Squid check the URL. Finds /rdims/index.jsp.
... checks the Host: header. Finds 192.168.0.164:88, making
URL=http://192.168.0.164:88/rdims/index.jsp
In that case,the host should be 192.168.0.164:88
why Host is 192.168.24.198 isn't 192.168.0.164:88 ?
I also tested another two cases:
alter HTTP_Port as follow:
http_port 192.168.0.164:88 accel vport defaultsite=192.168.24.198
When Clients access http://192.168.0.164:88/rdims/index.jsp
HTTP request header which Squid sent to backend server is:
GET /rdims/index.jsp HTTP/1.0
Accept: */*
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;
SLCC1;.NETCLR 2.0.50727; InfoPath.1; .NET CLR 3.5.30729; .NET CLR
3.0.30618)
Host: 192.168.24.198
Via: 1.1 szrd.com:88 (squid/2.6.STABLE21)
X-Forwarded-For: 192.168.12.48
Cache-Control: max-age=259200
Connection: keep-alive
alter HTTP_Port as follow:
http_port 192.168.0.164:88 accel vport=8088 defaultsite=192.168.24.198
When Clients access http://192.168.0.164:88/rdims/index.jsp
HTTP request header which Squid sent to backend server is:
GET /rdims/index.jsp HTTP/1.0
Accept: */*
Accept-Language: zh-cn
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;
SLCC1;.NETCLR 2.0.50727; InfoPath.1; .NET CLR 3.5.30729; .NET CLR
3.0.30618)
Host: 192.168.24.198
Via: 1.1 szrd.com:88 (squid/2.6.STABLE21)
X-Forwarded-For: 192.168.12.48
Cache-Control: max-age=259200
Connection: keep-alive
could you explain how the Host is set for me ? thank you.
I maybe found out why this one was not working for you...
http://bugs.squid-cache.org/show_bug.cgi?id=2192
Amos
--
Please be using
Current Stable Squid 2.7.STABLE7 or 3.0.STABLE19
Current Beta Squid 3.1.0.13