Apache Web Server 2.2 Redirect to Tomcat changing the URL in the process

119 views Asked by At

Pre-conditions:

  1. SERVER lets call it X with Apache 2.2 who is accesible from INTERNET.
  2. SERVER lets call it Y with Tomcat 7 in our internal network (no outside access)
  3. We don't have control over the DNS so no option on changing anything there, all the config have to be over Apache.

What I want to do, and were Im stock in is this situation:

From Internet I can receive calls to X like "www.mydomine.com" this is ok, normal functionality.

Now I have to transform only if they call app1 "www.mydomine.com/app1" to "sub.mydomine.com/app1" and redirect that new URL (sub.mydomine.com) to Y to be processed.

Any idea on how to cofigure this properly?

NOTE: As Im testing this in local, I have change my host file to go to X when I call www.mydomine.com or sub.mydomine.com, but i cant manage to froward the redirection from X to Y on my virtualHost config.

0

There are 0 answers