[squid-users] Still proxying request for a reverse proxy

From: Eric Blanchi <ebb@dont-contact.us>
Date: Mon, 02 Oct 2006 11:27:38 +1000

Hi List,

I have gone back to an old issue put aside since April due to time
constraints. The initial mail was "Proxying request for a Reverse Proxy"
dated 6/4/06 for the curious.

Thanks to Henrik's comments, I was able to mostly succeed in the
following setup:

   DNS: Boxes:

   myPrivate1.com --> BOX A - Apache
   myPrivate2.com (Namebased virtualhost)

   --------------------------------------------
   my.Public.com --> BOX B - Squid 2
                      (Reverse Proxy)
                              |
                              V
                      BOX C - Apache

All request to my.Public.com would go to BOX C.
But I want my.Public.com/myfolder to be served by a specific host on BOX
A. To do this I've configured Squid to think of BOX A as a cache peer
and never to direct to the original server as follow:

acl domainWithSubsite dstdomain -i .Public.com
acl subsite urlpath_regex -i ^/myfolder.*

cache_peer myPrivate2.com parent 80 3130 proxy-only no-query no-digest
no-netdb-exchange
cache_peer_access myPrivate2.com allow domainWithsubsite subsite
cache_peer_access myPrivate2.com deny all
never_direct allow domainWithSubsite subsite

This works a treat except for one thing: the virtualhost block the
request matches is always the default one (Primary host).
The Apache access log on BOX A shows the request as:
   GET http://my.Public.com/myfolder HTTP/1.0

I would like to be able to specify which virtualhost to go to as I may
have a lot of them. The virtualhost would be dependent on which domain
is in the original request (my.Public.com).

Is there any way to achieve this?
Forcing Squid to use HTTP/1.1, or send a host: header of some sort?

Cheers, Eb.

--
Eric B. Blanchi
Received on Sun Oct 01 2006 - 19:27:43 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:04 MST