[squid-users] R: [squid-users] Example of squid accelerator

From: Riccardo Castellani <r.castellani_at_usl6.toscana.it>
Date: Wed, 19 Aug 2009 08:53:46 +0200

>you need at least one of defaultside=

Internet users reach my company site on IP address 1.2.3.244 where they find
a certain section which contents 4 icons.
These 4 icons (corresponding to 4 towns) links respectively to

http://1.2.3.4/LicroPS.sav.1/mkLicro.do?codCenter=22101
http://1.2.3.4/LicroPS.sav.1/mkLicro.do?codCenter=22102
http://1.2.3.4/LicroPS.sav.1/mkLicro.do?codCenter=22103
http://1.2.3.4/LicroPS.sav.1/mkLicro.do?codCenter=22104

User can decide what link is interesting, according to town to whose He
belongs, so there is no default page.
Can I describe in this way ?
http_port 1.2.3.4:80 accel vhost

>Don't use dst there, use dstdomain instead matching the allowed
>sitenames/hostnames

What's the reason ? Pheraps because with dst directive Squid looks up dns
for IPAddress from the domain-name, which is in request header.
I could having, for specific reasons, some sites which are not registred in
dns even if this time is not my case.

-----Messaggio originale-----
Da: Henrik Nordstrom [mailto:henrik_at_henriknordstrom.net]
Inviato: Tuesday, August 18, 2009 8:52 PM
A: Riccardo Castellani
Cc: squid-users_at_squid-cache.org
Oggetto: Re: [squid-users] Example of squid accelerator

tis 2009-08-18 klockan 17:02 +0200 skrev Riccardo Castellani:
> If I have squid on server A and Web server B, I wish using squid
Accelerator
> on A to forward all requests to B. The requests are incoming from Internet
> to Squid port 80 where Squid Accelerator should have to forward them to
> machine B on port 8080.
> Squid A works also as proxy server for my internal clients of my company
> which want to go to Internet.
>
>
> server A: Squid , IP=1.2.3.4, on public network, http port=80
> server B: Web server, IP=A.B.C.D, on internal network, httpd port=8080
>
>
> What do you think about these directives ?
>
> http_port 1.2.3.4:80 accel

you need at least one of defaultside= or vhost as well.. if not Squid
doesn't know how to read the requests.. Most people want to use vhost
there.

> cache_peer A.B.C.D. parent 8080 0 no-query originserver name=PSAccel

ok.

> acl MySite dst 1.2.3.4
> http_access allow MySite
> cache_peer_access PSAccel allow MySite
> cache_peer_access PSAccel deny all

Don't use dst there, use dstdomain instead matching the allowed
sitenames/hostnames.

> notes:
>
> defaultsite is not used because I want user has to specify the whole url.
>
> URL which people can access from internet is
> http://1.2.3.4/LicroPS.sav.1/mkLicro.do?codCenter=22101

The browser will send that as

GET /LicroPS.sav.1/mkLicro.do?codCenter=22101 HTTP/1.1
Host: 1.2.3.4
[more headers]

vhost makes Squid use what is in the host header when building the
requested URL.

defaultsite specifies explicit what site name:port to use when
reconstructing the requested URL. Also used as fallback if there is no
Host header.

Regards
Henrik
Received on Wed Aug 19 2009 - 06:54:01 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 19 2009 - 12:00:04 MDT