httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Mathew" <jacobgmat...@gmail.com>
Subject [users@httpd] Reverse Proxy Sanity Check
Date Fri, 30 May 2008 15:17:22 GMT
I'm looking to setup apache as a reverse proxy to a couple of tomcat
servers. What I want is something like this:

www.proxy.com/app1   --->    www.app1.target.com
www.proxy.com/app2   --->    www.app2.target.com

>From what I can tell from the guides, to get this to work correctly
there needs to be some kind of rewriting of the URL's in the response
from tomcat. As I understand it the ProxyPassReverse directive will
rewrite the URL's in the HTTP header and ProxyHTMLURLMap from
mod_proxy_html takes care of rewriting the URL's in the html page.

So far it all seems quite solid, but then there is the issue of URL's
in javascript and other embedded content which can't identified by
ProxyHTMLURLMap. The solution proffered seem to be to use
ProxyHTMLExtended and identify the URL using regular expressions. This
is the part that I am not so confident about. This seems error prone.
So I wanted to get some opinion about whether this was a sensible way
to go for a highly visible website.

Another thing is app1 and app2 really only return URL's that are
relative to the hostname, so it seems like if I set things up like
this:

www.proxy.com/app1   --->    www.app1.target.com/app1
www.proxy.com/app2   --->    www.app2.target.com/app2

Then it almost eliminates the need to do any URL rewriting at all. I
would much rather not set things up like this, and would like to do
this only if URL rewriting using ProxyHTMLURLMap is not recommended.

Any opinions are welcome.

-Jacob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message