Please help! I am hoping for some insight from the web experts out there. I have 2 separate instances of JBoss 4.2.3 running on the same server, each hosting a different application which are not clustered deployed to the JBoss_Home/default/deploy directory. Most of the documentation and posts I have come across have plenty information about configuring Apache to load balance but I am not setting it up this way. I am trying to setup Apache to route incoming request to a particular instance of JBoss depending on the URL that is entered and not load balance the requests.
My hostname in the URL is really an Alias name for the actual hostname, by using a CNAME lookup. So http://dogs-cats/ = http://hostname.net/. Its currently configured that if I hit http://dogs-cats/ or http://hostname.net/ they both resolve to the Apache welcome screen (No ReWrite rule defined). If I hit the full application URL http://dogs-cats/app1/index.html then it resolves to the application welcome page correctly (No ReWrite rule defined).
What I am trying to achieve is if I hit URL http://dogs-cats/ it takes me to the application page instead of the Apache welcome screen and keeps the same URL in the address bar. Prior to installing the second instance of JBoss I was able to leverage a ReWrite Valve to direct http://dogs-cats/ to my application and it kept the same http://dogs-cats/ URL in the address bar. In the rewrite.properties I was using the ReWrite rule > ^/$ /app1/index.html which was working perfectly. Using the same ReWrite rule within Apache gives me a 404 error when I try to hit http://dogs-cats/
I have DEBUG enabled for the mod_jk.log and see the following:
[Wed Nov 20 12:32:14 2013][3936:4924] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/' from 2 maps
[Wed Nov 20 12:32:14 2013][3936:4924] [debug] find_match::jk_uri_worker_map.c (945): Attempting to map context URI '/app1*=worker1' source 'uriworkermap'
[Wed Nov 20 12:32:14 2013][3936:4924] [debug] find_match::jk_uri_worker_map.c (945): Attempting to map context URI '/jkstatus=status' source 'JkMount'
[Wed Nov 20 12:32:14 2013][3936:4924] [debug] jk_map_to_storage::mod_jk.c (3798): no match for / found
Apache is installed on the same server as the other JBoss two instances
I am leveraging Virtual Host and have tried a few different JkMount options. Is the relative path I’m defining the problem?
#JkMount /servlets-examples/* worker1
#JKMount /APPS/Application1/JBoss1/server/default/deploy/* worker1
JkMount /app1/* worker1
#JkMount /servlets-examples/* worker2
#JKMount /APPS/Application2/JBoss2/server/default/deploy/* * worker2
JkMount /app2/* worker2
#Define a worker named 'worker1'for Application
#Set worker properties
#Define a worker named 'worker2' for Application 2
#Set worker properties
uriworkermap.properties config file
Many thanks in advance