/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-06 / Problem with internal server ports

[ << ] [ >> ]

[ HA options for pound? / "Jay West" ... ] [ How to check the health of Pound / "Alex ... ]

Problem with internal server ports
ihernandez(at)cinemasoft.com.ar
2004-06-04 16:45:07 [ SNIP ]
Hello. I have a external server X.X.X.X port 80 with pound on that port,
and an internal webserver y.y.y.y port 590.
the y.y.y.y does a redirect (302) object moved reply, but pound giveto
the remoteclient this:
Location: http://X.X.X.X:590
what can i do to instruct pound to rewarite the outgoing  url??
Thanks
Ivan Hernandez


RE: Problem with internal server ports
Matthias Gärtner <mgaertner(at)metaship.net>
2004-06-05 17:10:44 [ SNIP ]
Pound does not rewrite the data stream, so you need to configure this with
the WebServer.
The Location: http://X.X.X.X:590 header comes from the web server, not
pound.
Let the Web Server know that its external port is 80, not 590.

For example, in Apache Tomcat, there is a ProxyPort setting to override the
default (which is the port the internal server listens on, which is 590 in
your case).

Which web server do you use?

Regards,
Matthias

> -----Original Message-----
> From: ihernandez(at)cinemasoft.com.ar 
> [mailto:ihernandez(at)cinemasoft.com.ar] 
> Sent: Friday, June 04, 2004 4:45 PM
> To: pound(at)apsis.ch
> Subject: Problem with internal server ports
> 
> 
> Hello. I have a external server X.X.X.X port 80 with pound on 
> that port, and an internal webserver y.y.y.y port 590. the 
> y.y.y.y does a redirect (302) object moved reply, but pound 
> giveto the remoteclient this:
> Location: http://X.X.X.X:590
> what can i do to instruct pound to rewarite the outgoing  
> url?? Thanks Ivan Hernandez
> 



Re[2]: Problem with internal server ports
Pavel Merdine <pounduser(at)merdin.com>
2004-06-29 18:39:47 [ SNIP ]
Hello ,

It actually does rewrite.
 * Location rewriting on redirect:
 *     if  the request contains a Header directive
 *         and the response is codes 301, 302, 303, 307
 *         and the Location in the response is to a known host
 *     then the Location header in the response will be rewritten to point
 *         to the Pound protocol/port itself

Maybe Ivan has version lower than 1.5...

Actually the rewriting is good for the situation below. But it fails
in another situation, when there are aliases for a site and there is
redirection from one two another. So it would be better to check the
location header before changing.
Unfortunately, maintainer is not a responsive person. So I just
comment out the buggy code in each release.

Saturday, June 5, 2004, 7:10:44 PM, you wrote:

> Pound does not rewrite the data stream, so you need to configure this with
> the WebServer.
> The Location: http://X.X.X.X:590 header comes from the web server, not
> pound.
> Let the Web Server know that its external port is 80, not 590.

> For example, in Apache Tomcat, there is a ProxyPort setting to override the
> default (which is the port the internal server listens on, which is 590 in
> your case).

> Which web server do you use?

> Regards,
> Matthias

>> -----Original Message-----
>> From: ihernandez(at)cinemasoft.com.ar 
>> [mailto:ihernandez(at)cinemasoft.com.ar] 
>> Sent: Friday, June 04, 2004 4:45 PM
>> To: pound(at)apsis.ch
>> Subject: Problem with internal server ports
>> 
>> 
>> Hello. I have a external server X.X.X.X port 80 with pound on 
>> that port, and an internal webserver y.y.y.y port 590. the 
>> y.y.y.y does a redirect (302) object moved reply, but pound 
>> giveto the remoteclient this:
>> Location: http://X.X.X.X:590
>> what can i do to instruct pound to rewarite the outgoing  
>> url?? Thanks Ivan Hernandez
>> 





-- 
/ Pavel Merdine



Re: Problem with internal server ports
Robert Segall <roseg(at)apsis.ch>
2004-06-30 14:46:27 [ SNIP ]
On Tuesday 29 June 2004 18.39, Pavel Merdine wrote:
> Hello ,
>
> It actually does rewrite.
>  * Location rewriting on redirect:
>  *     if  the request contains a Header directive
>  *         and the response is codes 301, 302, 303, 307
>  *         and the Location in the response is to a known host
>  *     then the Location header in the response will be rewritten to point
>  *         to the Pound protocol/port itself
>
> Maybe Ivan has version lower than 1.5...
>
> Actually the rewriting is good for the situation below. But it fails
> in another situation, when there are aliases for a site and there is
> redirection from one two another. So it would be better to check the
> location header before changing.
> Unfortunately, maintainer is not a responsive person. So I just
> comment out the buggy code in each release.

Point out the buggy code and I'll take it out - save you some work. Even 
easier: describe the scenario where Location redirection fails and I'll fix 
it myself.

As to checking the Location: Pound does that (see above). It is changed ONLY 
if it points to a known Pound address (e.g. if the redirect is to 
http://x.y.z:8080/abc and x.y.z:8080 is a Pound back-end the Location is 
changed to http://pound.addr:80/abc, where pound.addr:80 is the address Pound 
listens at). This fixes a lot of issues with servers such as OpenACS which do 
a lot of redirects to themselves.

As to the OP: given the above rules I don't see how Pound could have done 
that, making Matthias correct. I suspect your redirect is issued by the 
back-end itself. To be sure try to sniff the traffic between Pound and the 
back-end.
-- 
Robert Segall
Apsis GmbH
Postfach, Uetikon am See, CH-8707
Tel: +41-1-920 4904

MailBoxer