new to JBoss and am configuring some applications. I know how to do this in apache webserver, but not using Jboss.
I have successfully deployed 3 applications on a redhat box, JBoss 4.2.
If my server is called fruit.mycompany.com, I can access the three apps this way:
http://fruit.mycompany.com:8080/quince
http://fruit.mycompany.com:8080/pineapple
http://fruit.mycompany.com:8080/lime
Next, I created three subdomains, which are aliases of the server fruit.
http://quince.mycompany.com
http://pineapple.mycompany.com
http://lime.mycompany.com
How can I get each subdomain to point at it’s corresponding application?
I want http://quince.mycompany.com to actually open http://fruit.mycompany.com:8080/quince.
In apache, I would use the VirtualHost tag to point each subdomain to the correct Document Root. How do I do it with JBoss or Tomcat?
Can I do it with redirection ( does Tomcat have something like mod_rewrite )?
I gave up with Tomcat.
The situation became too complicated.
I have a web site running on port 80 already (on a separate instance of JBoss).
I have these three applications, quince, pineapple and lime running on their own JBoss instance on port 8080.
To solve my problem, I just wrote a javascript function on the index page of the website running on port 80.
I check location to see which domain is being called and then redirect to the appropriate website on port 8080.
The script looks something like this:
It’s not exactly what I wanted, but at least my users now have a shortcut URL, and they don’t have to remember port numbers:
http://lime.mycompany.com redirects to -> http://lime.langara.bc.ca:8080/lime