Re: [squid-users] Reverse proxy with 2.6 and several backends with different ports

From: Henrik Nordstrom <[email protected]>
Date: Tue, 03 Jul 2007 00:31:48 +0200

On Mon, 2007-07-02 at 17:52 +0200, Emilio Casbas wrote:

> No, our squid-2.5 accelerator configuration is:
>
> httpd_accel_host virtual
> httpd_accel_port 80
> httpd_accel_with_proxy on
> httpd_accel_uses_host_header on

Are you sure about the httpd_accel_host virtual think?? Not commonly
used, and requires redirector rules to rewrite the host IP addresses to
suitable webservers..

> plus the several rewrite rules working in redirector.

The redirector rule you posted could not match in the data you posted
with the above configuration.

> Which we have translate to:
>
> http_port 80 accel defaultsite=www.unav.es vhost

Kind of.. "httpd_accel_host www.unav.es" in the 2.5 config above would
make them more equivalent..

> cache_peer webcluster.cti.unav.es parent 80 0 no-query originserver
> name=unav

That's fine.

> In order to route the problematic request We have done:
>
> http_port 80 accel defaultsite=www.unav.es vhost
> acl argatest urlpath_regex /alumno/ga/
>
> cache_peer webcluster.cti.unav.es parent 80 0 no-query originserver
> name=unav
> cache_peer arga.unav.es parent 8080 0 no-query originserver name=arga
>
> cache_peer_access arga allow argatest
> cache_peer_access unav deny argatest

Looks ok. You might want to use a ^/alumno/ga/ above however just in
case that string appears elsewere in a requested URL...

> and we have deleted the rewrite rule on the redirector.
>
> Now seeing the access.log looks like is working;
>
> orfeo.cti.unav.es - - [02/Jul/2007:16:52:19 +0200] "GET
> http://www.unav.es/alumno/ga/alumno/servlet/es/unav/ga/comun/consultasAlumno/ConsultasAlumno.html
> HTTP/1.0" 302 495 TCP_MISS:FIRST_UP_PARENT

And if you use the normal Squid format you'll also see which parent it
was sent to.

This indicates the web server responded with a redirect. If you enable
log_mime_hdrs you will see the full server response, in there look for
the Location header to see where the redirect sent by the server was
going..

Regards
Henrik

Received on Mon Jul 02 2007 - 16:31:54 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Aug 01 2007 - 12:00:03 MDT