Re: [squid-users] squid reverse proxy isssue

2008-05-08 Thread Henrik Nordstrom
On ons, 2008-05-07 at 08:47 +0530, Indunil Jayasooriya wrote:

 Now, the question I have is I need to have 2 servers . When primary
 goes down, Squid should forward it to Secondary server. But, It does
 not.

It does, but you may need to be qutie patient in the default
configuration.

To speed this up see the connect_timeout parameter, or it's equivalent
per cache_peer option...

Regards
Henrik



Re: [squid-users] squid reverse proxy isssue

2008-05-06 Thread Indunil Jayasooriya
  Skip the accel directive, or upgrade to a more recent Squid version..

  More recent RHEL packages can be found from the download section of the
  web site.

I went to the squid site and downloaded
squid-2.6.STABLE19-1.el5.i386.rpm RPM. I have now upgraded. Now, I do
not get that issue.

Now, the question I have is I need to have 2 servers . When primary
goes down, Squid should forward it to Secondary server. But, It does
not.

Primary Server is 192.168.9.5
Secondary Server is 192.168.9.4

My squid box is 192.168.9.62

Here is squid.conf.

http_port 80 accel defaultsite=your.main.website
cache_peer 192.168.9.5 parent 80 0 no-query  originserver
cache_peer 192.168.9.4 parent 80 0 no-query  originserver
acl our_sites dstdomain your.main.website
http_access allow our_sites

cache_peer_access 192.168.9.5 allow our_sites
cache_peer_access 192.168.9.4 allow our_sites
never_direct allow our_sites

I got these lines from Amos. Squid forwards request to primary
(192.168.9.5). Then, What I did was I removed ethernet cable from
primary Server- 192.168.9.5 ) , Then, I browsed, But, squid did not
forward it to Secondary Server (192.168.9.4) .


Hope to hear from you with your IDEAS.

-- 
Thank you
Indunil Jayasooriya


Re: [squid-users] squid reverse proxy isssue

2008-05-05 Thread Indunil Jayasooriya
  Can your Squid box resolve your http_port line?  Whatever you have as the
 actual your.main.website needs to be resolveable.

No, your.main.website can not be resolved.

I added your.main.websit to /etc/hosts file. Now , I can ping your.main.website

What I did was I configured apache to run on the samebox on 127.0.0.1

pls see below

I have added this to http.conf file.

Listen 127.0.0.1:80




I can telnet to 127.0.0.1 and your.main.websit on port 80.

pls see below

[EMAIL PROTECTED] squid]# telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

[EMAIL PROTECTED] squid]# telnet your.main.websit 80
Trying 127.0.0.1...
Connected to your.main.websit (127.0.0.1).
Escape character is '^]'.


Then, I chaned squid.conf as below

http_port 192.1.54.101:80 accel defaultsite=your.main.websit
cache_peer 127.0.0.1 parent 80 0 no-query originserver

cache_peer_access 127.0.0.1 allow our_sites
acl our_sites dstdomain your.main.websit

again, same error.

Pls see below.

[EMAIL PROTECTED] squid]# /etc/init.d/squid restart
Stopping squid:[FAILED]
Starting squid:[FAILED]

[EMAIL PROTECTED] squid]# tail -f /var/log/messages

May  5 11:37:20 mail squid: Bungled squid.conf line 76: http_port
192.1.54.101:80 accel defaultsite=your.main.websit
May  5 11:46:27 mail last message repeated 4 times

Hope to hear from you.


-- 
Thank you
Indunil Jayasooriya


Re: [squid-users] squid reverse proxy isssue

2008-05-05 Thread Henrik Nordstrom
On mån, 2008-05-05 at 11:07 +0530, Indunil Jayasooriya wrote:
  May  5 11:01:56 mail squid: Bungled squid.conf line 76: http_port 80
  accel defaultsite=your.main.website
 
  This is on RedHat EL 5 with default RPM squid-2.6.STABLE6-3.el5
 
  Any advice to get it working.

Skip the accel directive, or upgrade to a more recent Squid version..

More recent RHEL packages can be found from the download section of the
web site.

Regards
Henrik