Re: [squid-users] Url Rewrite

From: Amos Jeffries <squid3@dont-contact.us>
Date: Wed, 05 Dec 2007 00:04:55 +1300

Almered Niklas wrote:
> Hi!
>
> We're trying to configure a Squid 2.6 stable 16 with two servers, a
> webserver with Linux and Apache and a web mapping server with Windows
> and IIS.
>
> A: application.example.com (Apache webserver on port 8081)
> B: map.example.com (IIS web mapping server o port 80)
>
> Now, Squid is installed om the Linux machine listening to port 80 and my
> aim is that Squid should do a rewrite on url:s like
> application.example.com/proxy and redirect them to map.example.com
>
>
> The squid.conf file looks like this:
>
> acl our_proxyurl url_regex application.example.com/proxy
>
> url_rewrite_access allow our_proxyurl
> url_rewrite_program /usr/local/squid/bin/test.pl
> url_rewrite_children 10
> url_rewrite_host_header on
> always_direct allow all
>
> http_port 80 accel defaultsite=application.example.com
>
> cache_peer 1.2.3.85 parent 8081 0 no-query originserver name=server_app
> cache_peer 1.2.3.65 parent 80 0 no-query originserver name=server_map
>
> We accomplished the rewrite but at the same time access is being denied
> to application.example.com with the following error:
> "Unable to forward this request at this time"
>
> How do I configure the Squid with url rewrite without losing access?

You will need an http_access control to permit access to those websites.

I would also suggest either cache_peer_domain or cache_peer_access +ACLs
to direct certain traffic to each peer.

'always_direct'+'cache_peer ... no-query' might cause problems later ...
you will need to test if the always_direct is actually needed once
http_access is properly configured.

Amos
Received on Tue Dec 04 2007 - 04:05:06 MST

This archive was generated by hypermail pre-2.1.9 : Tue Jan 01 2008 - 12:00:01 MST