Nick Duda wrote:
I have a transparent 2.6 stable 19 setup. Its working for just one port 80 
redirect but now I need it to redirect to a different internal server on port 
80 for a certain domain only.

Can someone help me with a basic config, here is what I need:

- Squid listening in transparent mode on port 80
- Any request to port 80 goes to a cache_peer (internal IIS server) at 
192.168.1.10
- Any request to port 80 for a certain url www.example.com goes to a cache_peer 
(another internal IIS server) at 192.168.1.20

Here is what I suspect the config would have looked like, but didn't work 
(example):

http_port 80 accel vhost

cache_peer 192.168.1.10 parent 80 no-query originserver
cache_peer 192.168.1.20 parent 80 no-query originserver

cache_peer_domain 192.168.1.20 example.com

What do I need to do for this to happen?

You would need two cache_peer_domain lines...

cache_peer_domain 192.168.1.20 .example.com
cache_peer_domain 192.168.1.10 !.example.com

...which would steer all example.com requests (note the leading period in the cache_peer_domain line) to 192.168.1.20 and everything else at 192.168.1.10.

- Nick

Chris

Reply via email to