Re: [squid-users] squid vport

From: wangwen <wangw330_at_126.com>
Date: Tue, 29 Sep 2009 21:43:39 +0800

----- Original Message -----
From: "Michael Lenaghan" <michaell_at_dazzit.com>
To: "Amos Jeffries" <squid3_at_treenet.co.nz>
Cc: "wangwen" <wangw330_at_126.com>; <squid-users_at_squid-cache.org>
Sent: Tuesday, September 29, 2009 9:30 PM
Subject: Re: [squid-users] squid vport

>> "accel vhost defaultsite=192.168.24.198 vport=8080" means ...
>>
>> ... 'accelerate' the URL.
>> ... (vhost) use client-given Host: header when available.
>> ... (vport=) use the client-given Host: HTTP port (default 8088 if none
>> found).
>> ... (defaultsite=) use 192.168.24.198 if neither of the above give a
>> usable
>> domain/IP.
>>
>> 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
>>
>> 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.
>
> Amos, I only read a small portion of the code but I believe that if a
> vport is *specified* it's *always* used.
>
> This is 2.7:
>
> if (vport > 0)
> port = vport;
> else
> port = htons(http->conn->me.sin_port);
>
> (The 2.6 code is different but I believe it has a similar intent.)
>
> Either way it would be great if the docs were more specific!
>
> Something else that's confusing in the docs: Does accel have to be
> specified if vhost, vport or defaultsite is given? Or are the docs
> trying to say that those things have no effect unless accel is given?
> Again, it would be great if the docs were clearer.
>

>> 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 actually 192.168.24.198:88.

Thank you.
Received on Tue Sep 29 2009 - 13:43:53 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 29 2009 - 12:00:03 MDT