Re: [squid-users] Accelerator proxy redirect question.

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 4 Sep 2003 09:09:49 +0200

On Thursday 04 September 2003 02.35, Thad Irvin wrote:
> I'm trying to set up squid to do proxy redirects for hosts that are
> positioned behind the squid host. My current configuration is as
> follows.
>
> Squid Proxy: listens on port 80.
> Accelerator Host 1.1.1.212 Port 8080
> Accelerator Host 1.1.1.211 Port 3000
>
> The FQDN on the outside of the proxy for the individual hosts:
> <http://www.domainname.com> --- Should come in to squid on port
> 80, then redirect to host 1.1.1.212:8080.
>
> <http://webmail.domainname.com> --- Should come in to squid on
> port 80, then redirect to host 1.1.1.211:3000.

To do this with Squid-2.5 you require the use of a redirector helper
which rewrites www.domainname.com and webmail.domainname.com to their
internal ip:port and the following squid.conf settings

  httpd_accel_host www.domainname.com
  httpd_accel_port 80
  httpd_accel_uses_host_header on

  redirect_program /path/to/your/redirector

  acl accelerated_domains dstdomain www.domainname.com
webmail.domainname.com
  acl HTTP protocol HTTP
  acl port80 port 80
  http_access allow accelerated_domains HTTP port80
  http_access deny all

However, I would strongly recommend moving the internal servers to
port 80 on their respective servers. This avoids then need of
changing the URL in the reverse proxy (the redirector helper) and a
bunch of ugly sideeffects of having different URLs externally and
internally. In such setup just add the acclerated domains to
/etc/hosts with the addresses of their internal servers and Squid
will know where to go.

In Squid-3 the setup will be different, using cache_peer and
cache_peer_access to forward the requests to their corresponding
servers.

Regards
Henrik

-- 
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org
If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, info@marasystems.com
Received on Thu Sep 04 2003 - 01:12:04 MDT

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