On Tuesday 22 July 2003 05.39, jonathan soong wrote:
> Sometimes the internal webserver sends 301/302 responses saying:
> "redirect to localmachine.localdomain".
> Is it possible to have Squid intercept the 301/302 responses and
> rewrite them?
There is some old code lurking around for doing this in the rproxy
branch of Squid. Unfortunately it is not in a very good shape at the
moment.
> The localmachine.localdomain is on our local network and can't be
> seen from the Internet.
My preferred method is to make the server aware of it's external name
and not use a redirector helper in Squid for accelerator setup. This
is most easily done by
1. Adding the domain to the web server configuration.
2. Add the domain to /etc/hosts on the Squid server with the IP
address of the backend web server.
3. Configure squid.conf with
httpd_accel_host your.main.accelerated.domain
httpd_accel_uses_host_header on [if more than one domain]
acl my_servers src ip.of.accelerated.server ...[if more than one]
acl http protocol http
acl port80 port 80
http_access allow http port80 my_servers
http_access deny all
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.comReceived on Tue Jul 22 2003 - 02:03:37 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:14 MST