Henrik Nordstrom-5 wrote: > > On mån, 2008-07-21 at 15:18 -0700, elsergio wrote: > >> I am trying to configure a reverse proxy. The idea is to have several web >> servers in my network and also a DNS. The dns server will have the >> planning >> logic for choosing the optimal web server. I want Squid to ask for the >> web >> server ip address to this dns server. Then Squid will forward the request >> to >> the given ip. >> >> It is possible to do this? If this is possible,. how can I do it? > > Yes, if you accept that peering with other Squids is not possible. > > http_port 80 accel vhost > > always_direct allow all > > acl my.servers dstdomain site1.domain site2.domain ... > acl http proto http > acl 80 port 80 > > http_access allow my.servers http 80 > http_access deny all > > and make the DNS return a very very short TTL for sites where you do > dynamic serverselection.. (if not squid will cache the DNS response for > as long as it's valid). > > > Byt personally I would let Squid do the server selection, with the > seletion logics in squid.conf. > > http_port 80 accel vhost > > cache_peer ip.of.server1 parent 80 0 no-query originserver name=server1 > acl server1_domains dstdomain site1.domain > cache_peer_access allow server1 server1_domains > > cache_peer ip.of.server2 parent 80 0 no-query originserver name=server2 > acl server2_domains dstdomain site2.domain > cache_peer_access allow server2 server2_domains > > [etc] > > If you have multple servers for the same sites add multiple cache_peer > lines, and a peer seletion algorithm such as round-robin, > weighted-round-robin, sourcehash, userhash or carp. > > If there is very many domains hosted per server then use file based acls > > acl serverX_domains dstdomain "/path/to/server1_domains.txt" > > Regards > Henrik > > > Hi Henrik, - http_port 80 accel vhost # accel vhost? what is used for? - allways_direct allow all #do I need something like acl all src 0.0.0.0/0.0.0.0 ? For the option A (with dns server). If the dns server's IP is 192.168.10.10 dns_nameservers 192.168.10.10 #is this the way to configure it? For the option B (squid will be in charge of the logics): If the web server's IP's are wsIP1, wsIP2 and wsIP3 cache_peer wsIP1 parent 80 0 no-query originserver name=S1 round_robin cache_peer wsIP2 parent 80 0 no-query originserver name=S2 round_robin cache_peer wsIP3 parent 80 0 no-query originserver name=S3 round_robin acl S1_domains dstdomain site.domain acl S2_domains dstdomain site.domain acl S3_domains dstdomain site.domain cache_peer_access allow S1 S1_domains cache_peer_access allow S2 S2_domains cache_peer_access allow S3 S3_domains would this e the way to set it? Thanks for the wonderful help, Best regards, Sergio -- View this message in context: http://www.nabble.com/DNS-configuration-tp18578765p18585068.html Sent from the Squid - Users mailing list archive at Nabble.com.