Henrik Nordstrom wrote:
> Eric Blanchi wrote:
>
>> 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).
>
> The best is to set up a my.public.com virtualhost on the Apache, but you
> can also have Squid rewrite the requested domain either by using a
> url_rewriter, or by forcing the domain in the cache_peer directive.
I did create a virtualhost block on Apache but it wasn't being picked
up. I just needed to do some homework on my Apache skills I guess:
NameVirtualHost 123.123.123.123
<VirtualHost my.public.com>
ServerName my.public.com
DocumentRoot /var/www
</VirtualHost>
didn't work because my.public.com is not "A fully qualified domain name
for the IP address of the virtual host" [quote from Apache doc], instead
my.public.com is a fully qualified domain for a different IP (Box B in
my original Diagram.
The following works and is picked up:
NameVirtualHost 123.123.123.123
<VirtualHost 123.123.123.123>
ServerName my.public.com
DocumentRoot /var/www
</VirtualHost>
>> Forcing Squid to use HTTP/1.1, or send a host: header of some sort?
> Squid always sends a Host header.
Cool, I'll keep that in mind.
Once again Henrik, thanks for all.
Cheers, Eb.
-- Eric B. BlanchiReceived on Mon Oct 02 2006 - 23:37:41 MDT
This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:04 MST