RE: [squid-users] Squid reverse proxy - URL change in the response

From: <DGeorgie@dont-contact.us>
Date: Tue, 11 Oct 2005 14:47:34 -0400

Hi Cris,

Yes, I tried

        redirect_rewrites_host_header off

with the same result.

It looks to me Squid is not rewriting the URL of the response to look like
that of the request. The Web/J2EE application is using lots of redirects
and whatever it receives from Squid server ( httpd_accel_host &
httpd_accel_port) it sends back in the response in the Location HTTP
header.

So, probably I would need actually Squid to rewrite the host headers. I
was hoping I could achieve this effect through Squid configuration
directives but it looks to me now this is not possible. I'll check if
redirectors in Squid could help me control the response.

Thanks,

Dimitar

"Chris Robertson" <crobertson@gci.com>
10/11/2005 02:32 PM

To
<DGeorgie@wiley.com>
cc

Subject
RE: [squid-users] Squid reverse proxy - URL change in the response

Did you try the "redirect_rewrites_host_header off"? It sounds like that
might be the cause, as it defaults to "on".

Chris

> -----Original Message-----
> From: DGeorgie@wiley.com [mailto:DGeorgie@wiley.com]
> Sent: Tuesday, October 11, 2005 10:25 AM
> To: Chris Robertson
> Subject: RE: [squid-users] Squid reverse proxy - URL change in the
> response
>
>
> Thanks for the suggestion Chris. I already tried that in
> which case the
> URL in the response looks like this:
>
> http://IP_of_myhost.domain.com/....
>
> instead of
>
> http://myhost.domain.com/...
>
> Dimitar
>
>
>
>
> "Chris Robertson" <crobertson@gci.com>
> 10/10/2005 06:23 PM
>
> To
> <squid-users@squid-cache.org>
> cc
>
> Subject
> RE: [squid-users] Squid reverse proxy - URL change in the response
>
>
>
>
>
>
> > -----Original Message-----
> > From: DGeorgie@wiley.com [mailto:DGeorgie@wiley.com]
> > Sent: Friday, October 07, 2005 10:21 AM
> > To: squid-users@squid-cache.org
> > Subject: [squid-users] Squid reverse proxy - URL change in
> > the response
> >
> >
> > hi,
> >
> > A question related to the URL a client receives as a
> response to its
> > request.
> >
> > If a client sends the following request http://www.somename.com/...
> >
> > Squid in reverse proxy mode with the following configuration
> > httpd_accel_host myhost.domain.com
> > httpd_accel_port 8080
> > httpd_accel_single_host on
> > httpd_accel_uses_host_header off
> >
> > returns the following URL in the response
> >
> > http://myhost.domain.com:8080/ ...
> >
> > which is wrong. Is there any way I can tell Squid to return
> > back to the
> > user the original URL?
> >
> > Right now I am resorting to the following solution which I consider
> > temporary
> >
> > in /etc/hosts file add the following line
> >
> > IP_of_myhost.domain.com www.somename.com
> >
> >
> > and Squid configuration changes to
> >
> > httpd_accel_host www.somename.com
> > httpd_accel_port 80
> > httpd_accel_single_host on
> > httpd_accel_uses_host_header off
> >
> > Thanks,
> >
> > Dimitar
> >
>
> First a disclaimer. I don't run squid as an accelerator so I am not
> certain of any of the methods that I propose. According to
> http://www.faqs.org/docs/securing/chap28sec231.html, you
> might want to set
>
> http_accel_host IP_of_myhost.domain.com
>
> and
>
> redirect_rewrites_host_header off
>
> Chris
>
>
>
>
Received on Tue Oct 11 2005 - 12:47:47 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Nov 01 2005 - 12:00:04 MST