Re: [squid-users] reverse proxy, problem with conf

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 22 Dec 2011 22:27:58 +1300

On 22/12/2011 9:46 p.m., Alexis Krier wrote:
> Hello all, I have a little problem to test the ability of squid to
> reverse proxy.
>
> let's say I have to site for example: free.fr and laposte.net (this
> sites are real www sites)
>
> I want that client hit first squid and then go to free.fr or laposte.net:
>
> Client -----> SQUID ------> free.fr
> |
> -------->laposte.net
>
> so here is my conf on my windows desktop test machine:
> C:\WINDOWS\system32\drivers\etc\hosts:
> 127.0.0.1 localhost
> 127.0.0.1 free.fr
> 127.0.0.1 laposte.net
>
> squid.conf:
> http_port 80 accel defaultsite=google.fr
>
> cache_peer 212.27.48.10 parent 80 0 no-query originserver name=server_1
> acl sites_server_1 dstdomain free.fr
> cache_peer_access server_1 allow sites_server_1
>
> cache_peer 195.154.98.97 parent 80 0 no-query originserver name=server_2
> acl sites_server_2 dstdomain laposte.net
> cache_peer_access server_2 allow sites_server_2
>
>
> the Test case:
> When I set free.fr in my web browser I am redirected to squid but I'm
> forwarded to google.fr and not free.fr as excpected
> Same thing with laposte.net, where am I wrong?

The http_port directive is configured to reverse-proxy only for the
google.fr domain. Any traffic which arrives is automatically using that
domain.

To receive multiple domains in one port you need to enable name-based
virtual hosting in Squid by adding the "vhost" option to http_port.

Amos
Received on Thu Dec 22 2011 - 09:28:06 MST

This archive was generated by hypermail 2.2.0 : Thu Dec 22 2011 - 12:00:03 MST