[squid-users] squid reverse proxy

From: Jason Yates <jyates@dont-contact.us>
Date: Thu, 1 Aug 2002 10:18:25 -0400

Here is my current configuration file a simple reverse proxying solution.

squid.conf:

http_port 80
visible_hostname www.foo.com

httpd_accel_host 192.168.1.2
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header off

For right now this configuration works fine, but in about a month we're
going to start load balancing between two web servers(192.168.1.2 and
192.168.1.3). I need to split up requests between these two servers. How
could I configure squid to do that for me?

I also have another problem. I need requests coming to
http://www.foo.com/home/ to get reverse proxyied to http://192.168.1.3/home/
and stay out of the 192.168.1.2 and 192.168.1.3 array. I not sure about a
redirectors like this one.

#!/usr/bin/perl
$|=1;
while (<>) {
        s@/home$@http://192.168.1.3/home/@;
        print;
}

I don't think that script will handle the job correctly, because that just
redirects requests from foo.com/home/ to 192.168.1.3/home/. I really don't
want a redirect per se. I need requests proxyied to 192.168.1.3 for
anything in the /home directory, so it makes it look like everything's on
the foo.com server. Can I do this, if so how?

-Jason Yates
Received on Thu Aug 01 2002 - 08:25:07 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:30 MST