You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by John Fulmer <jf...@iegroup.com> on 1997/08/13 05:20:03 UTC

mod_proxy/992: ProxyPass does not handle relative links that start with "/" well.

>Number:         992
>Category:       mod_proxy
>Synopsis:       ProxyPass does not handle relative links that start with "/" well.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Aug 12 20:20:02 1997
>Originator:     jfulmer@iegroup.com
>Organization:
apache
>Release:        1.2.1
>Environment:
RedHat Linux 4.2 (Linux 2.0.30)
>Description:
In trying to set up a "reverse" proxy server (proxying outside connections to 
internal machines), I was trying a line in the srm.conf like "ProxyPass /foobar 
http://foobar.foo.com" to mape foobar.foo.com to the directory /foobar on the 
proxy machine. This works okay in some situations and " http://proxy.foo.com/foobar"
will pull up the home page for foobar.foo.com.

However, I found that if a web page had links specified as 
"foo.gif", images and pages would load properly. If the link, however, specified
any kind of a path at all, without a hostname, like "/images/foo.gif", 
the images would not load. The links in the pages show that they are looking
for the images/pages in "proxy.foo.com/images" instead of 
"proxy.foo.com/foobar/images". Shouldn't the proxy rewrite these links to 
properly reflect the proxy server hierarchy? On static pages it it fine to specify
the static links, but it nice to organize graphics in their own directory, and 
on some CGI's to which I don't have source for, hard code the front "/".

Note that the "mod_rewrite" won't help me, since I have several internal hosts 
to do this to, and they may duplicate directories.

Thanks  
>How-To-Repeat:

>Fix:
Have the proxy server note that on a ProxyPass statement, the server needs to
rewrite embedded URL's to properly reflect the proxy/server relationship. 
Possibly simply removing the front "/" may do the trick, but that is just a 
guess
>Audit-Trail:
>Unformatted: