httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean O'Neill <>
Subject [users@httpd] Problem with Rev Proxy config and mod_rewrite
Date Thu, 06 Mar 2003 05:58:44 GMT
Using Apache 2.0.44 for this exercise.

This is what I have:

- I have a FreeBSD machine behind a firewall on a nonroutable network 
running Subversion on Apache.  To get to this subversion repository on this 
machine directly (while on the same subnet), you hit 
"".  You'll get back a simply list of 
one document (a README file) and 3 directories which are all links.

- On the firewall I have Apache 2.0.44 running - just assume its for this discussion.  I've got the following config for 
the Reverse Proxy setup:

RewriteRule ^/repos/?$ [NC,P]
RewriteRule ^/repos/(.*/)$$1 [NC,P]
RewriteRule ^/repos/(.*[^/])$$1/ [NC,P]
ProxyPassReverse /repos

The RewriteRule lines always make sure the proxied URL references always 
end in a / character.  I'm not regexp expert but this seems to work fine at 
least while watching the rewrite_log file they seem to do what I want them 
to.  Anyone wanting to educate me on a better way of doing things is 
welcome to advise me :)

I'm not sure about the ProxyPassReverse config setting.  I've also tried 
"ProxyPassReverse /" but I get the same 
results.  The above config KINDA works.

What happens is when you hit "", you will get 
the  initial page of the subversion repository on the FreeBSD machine just 
fine.  On this page are the one document, a README file, and 3 links to 
other directory structures in this repository.  This is where the problems 

- According to the returned web page source via either the reverse proxy 
config OR hitting the page directly on the server, 
the link to the README file is simply "<a href="README">README</a>".

- When hitting this page via the reverse proxy config and clicking on the 
README document URL link, the link is resolved as 
"".  This doesn't work because the "/repos" 
portion of the URL is missing.

- When hitting this page directory e.g., and clicking on the README document 
URL link, the README link is resolved as 
"" and works just dandy.

So my question is why the difference in how the URL is fully qualified from 
the "<a href="README">README</a>" source depending on how you hit the link 
e.g. reverse proxy vs. direct ?  What makes my browser qualify the same 
HTML source into different URLs obviously ignoring the hostname portion of 
the URL?

I know I'm missing something really simple.

......... ..- -. .. -..- .-. ..- .-.. . ... ............
.-- .. -. -... .-.. --- .-- ... -.. .-. --- --- .-.. ...

Sean O'Neill 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message