Re: [squid-users] Origin address header

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 08 May 2012 11:29:41 +1200

On 08.05.2012 08:33, Darvin Denmian wrote:
> Hi,
>
> I've configured a Squid instance running a Reverse Proxy
> configuration
> as stated in the following link:
>
> http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator
>
> Below the piece of configuration of my Reverse proxy:
>
> http_port 174.xxx.xxx.133:80 accel defaultsite=www.mysite.com
> cache_peer 174.xxx.xxx.133 parent 80 0 no-query originserver
> name=myAccel

Careful, those xxx.xxx better be different numbers or you just
configured a forwarding loop from Squid port 80 -> Squid port 80 ->
Squid port 80 ...

> acl our_sites dstdomain www.mysite.com
> http_access allow our_sites
> cache_peer_access myAccel allow our_sites
> cache_peer_access myAccel deny all
>
> Assuming that I have 2 hosts pointing to the IP "174.xxx.xxx.133"
> (that is the IP of my Reverse proxy):
>
> api.mysite.com
> sandbox.mysite.com
>
> How could I determine what address was used to access my proxy? Is
> there some header that holds this information?

"BasicAccelerator" is for a *single* website domain name. You need
virtual hosting as per
http://wiki.squid-cache.org/ConfigExamples/Reverse/VirtualHosting

Simply put; for Squid-3.1 and older which advertise HTTP/1.0 to clients
you need to add the "vhost" option to your http_port line and Squid will
perform HTTP/1.1 name-based virtual hosting. Squid-3.2 and later do this
by default as part of their HTTP/1.1 support.

Amos
Received on Mon May 07 2012 - 23:29:51 MDT

This archive was generated by hypermail 2.2.0 : Tue May 08 2012 - 12:00:04 MDT