Hi Indunil Jayasooriya, You maybe turn to the open source high-availability suite (such as heartbeat on http://linux-ha.org/), and set the Secondary web server to take over the Primary's resource (in this case, it is the Primary's IP address ). It is not Squid's job to detect and select which backend server is alive. Just for your reference. Xu Feng Yuanjie Networks,Shanghai,China MSN: xufengnju@xxxxxxx > -----Original Message----- > From: Indunil Jayasooriya [mailto:indunil75@xxxxxxxxx] > Sent: 2008年4月10日 14:55 > To: squid-users > Subject: Reverse proxy for Primary and then Secondary > > Hi all, > > I have 2 web servers . One is Primary and the other is Secondary. > > Pls asssume > ip of primary is 1.2.3.4 > ip of secondary 2.3.4.5 > > I want squid resverse proxy to forward traffic to primary server. > When, the primary goes offline, it should forward to Secondary web > Server. > > How can I acheive this task? > > I am going to keep squid as a reverse proxy in front of them? > > pls assume ip of reverse proxy is 5.6.7.8 > > How Can I write rules in squid.conf? > > pls see below rules. > > > http_port 80 accel defaultsite=your.main.website > > cache_peer ip.of.primarywebserver parent 80 0 no-query originserver > cache_peer ip.of.secondarywebserver parent 80 0 no-query originserver > > acl our_sites dstdomain your.main.website > http_access allow our_sites > > > > > -- > Thank you > Indunil Jayasooriya