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.





Reply via email to