RE: Patch to mod_proxy for fixed reverse mapping support

"Foust, Adam G." <[email protected]>
Newsgroups gmane.comp.apache.mod-proxy
Message-ID <[email protected]>
This patch makes a lot of sense. This would be very useful to my
organization. I hope it's seriously considered for incorporation in future
mod_proxy releases.
 
We had implemented a configuration workaround:
 
ProxyPassReverse /cgi-bin/redir?http://externalhost:777/yadda/
http://internalhost:999/yadda/
 
...that works, but using CGI is less than ideal. There's probably a slightly
better way to do this with mod_rewrite, but patching ProxyPassReverse to be
more versatile is hands-down the best solution.
 
-----Original Message-----
From: Martijn Schoemaker [mailto:[email protected]] 
Sent: Monday, July 29, 2002 8:38 AM
To: [email protected]
Subject: Patch to mod_proxy for fixed reverse mapping support
 
Hi, 
First of all, I would like to introduce myself. My name is 
Martijn Schoemaker and I so programming/systemadmin/everything 
*nix as my daytime job. 
I am currently working at a big customer with a pretty complex 
(too complex imho) proxy environment. This constists of 
netscape proxies, ssl accelerators, netcache appliances, layer-4 
switched and ofcourse apache proxies. In this environment we 
use https at the frontend which is 'converted' to http requests 
on the inside which are handled by the apache proxies. The problem 
is that mod_proxy (as in apache 1.3.26) cannot reverse map to 
urls outside it's own apache configuration. Because at different 
places after the proxy, redirects are sent which need to be 
rewritten to : https://fontend-address.com/ <https://fontend-address.com/>
<things> but because 
mod_proxy uses the apache URL construction routines is not 
possible (it will always map to http:// <http://> <ServerName>/<rest>). 
For this to be possible I created a small patch which does a 
check on the 'fake' url if it contains a '://' and if so it 
will use that as the first part and only pastes the additional 
uri to that. If not, it just uses the apache url construction 
routine as its default. 
i.e. instead of a mapping like: 
ProxyPassReverse /app/    http://internal-host:567/app
<http://internal-host:567/app>  
which will map to : http:// <http://> <ServerName>/app/ 
it uses : 
ProxyPassReverse https://frontend-address/app/
<https://frontend-address/app/>  http://internal-host:567/app
<http://internal-host:567/app>  
which will map to the fixed URL supplied (the first part that is) 
My question to you all is : am I making sense ? Can this be 
incorporated in future releases ? As far as I can see this is 
only added value and no other fake url will contain '://' unless 
it is meant as fixed anyway. 
I'd greatly appreciate any comments :) 
Greetings, 
Martijn Schoemaker 
  
-- 
------ WARNING: This signature contains a VIRUS ! -------
- SHLRUIOHUIOWHLNNMSKHKDLWINDOWSJHFHKJLLUIHEKJLNDHKKJHL -
---------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.