Re: [squid-users] acl-specific http_port

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 27 Mar 2001 11:57:15 +0200

I simpler and more generic approach would be to use cache_peer instead
of httpd_accel_host/port to find the correct backend server...

httpd_accel_host your.visible.domain
[optionally: httpd_accel_uses_host_header on]
httpd_accel_port 80

never_direct allow all

cache_peer server1 parent port1 0 no-query
cache_peer server2 parent port2 0 no-query
[create two aliases for the same IP if both run on the same server but
differnt ports]

acl special urlpath_regex dufus
cache_peer_access server1 deny dufus
cache_peer_access server2 allow dufus

This setup assumes the server can accept requests with a full URL (a
MUST in HTTP/1.1 specifications) but unfortunately not all servers do..

--
Henrik Nordstrom
Squid Hacker
mi@aldan.algebra.com wrote:
> 
> Hello!
> 
> I need to configure an accelerating squid to contact different ports (on
> the same machine if it matters) depending on the URL being requested.
> 
> I figured, if at all possible, I would need to use the acl mechanism and
> then something like
> 
>         acl special_server urlpath_regex dufus
>         http_port_by_acl dufus 8000
>         http_port_by_acl !special_server 80
> 
> Any comments? Or do I need to use the external redirecting programs?
> 
> Thanks!
> 
>         -mi
Received on Tue Mar 27 2001 - 03:29:28 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:59 MST