I have Pound set up to reverse proxy from incoming
on port 81 (for test purposes) to a server listening on 8002. For the purposes
of this test I am only concerned with HTTP.
Using IE when I enter http://www.sitename.com:81, Pound does a great job of passing the
request to the backend that listens on port 8002, and the URL shown in the
address bar remains as entered (port 81). However, when I click on links on the
returned page (which are all relative links such as /home/images), the address
bar changes to reflect the port on which the server is listening (port 8002) -
http://www.sitename.com:8002/home/contacts . In other words the
browser is now making the request direct to the server on port 8002 rather than
through Pound on port 81.
Puzzlingly, Mozilla does not do this. Mozilla
continues to request the relative urls using port 81, so clearly there is
something that IE chooses to do in the presence or absence of certain
information that Mozilla does not do (I am assuming that Pound does not pass the
backend server port information to the browser deliberately since that would
seem to run counter to its intended function).
"Many web-apps (in particular OpenACS) like to
redirect http requests to different urls on the same
server..........When the backend (say host:8000)
makes a redirect to itself, the redirect should really point to the proxy
OpenACS sets up many Aolserver request filters
which trigger redirects based upon a set of url structure assumptions and rules,
however I don't know for certain if thi is the issue. Could it be
caused by Explorer's interpretation of the current path from which to seek a
relative url? Of one thing I can be certain - the urls on the site are relative
not absolute. I know this because the reverse proxy works fine both when using
Mozilla as the client, and also when using another reverse proxy solution as an
alternative to Pound.
I note that in the current (non beta) version
of Pound the LocationUrlRewrite parameter is not an option and I wondered if
this means that I must track down Gustav's patches and use v1.4, or whether
there is something else that I can do to prevent this happening.
If anyone has any ideas as to why when a request
for a relative url is received from Internet Explorer by Pound, the request is
redirected by IE to port 8002 instead of using the port 81 connection already
established, I would be most grateful to hear about them.