Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache & Tomcat problem

 
blue sky
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I use Apache & Tomcat to run Servlet & jsp. I've a problem like this :
I have 2 application app1 and app2
I deploy both of them run on 1 server like :
Ex : app1 : http://172.10.30.10/app1
app2 : http://172.10.30.10:81/app2
it's OK.
But I also want to config so that when I use http://172.10.30.10 then it runs app1 and http://172.10.30.10:81 then it run app2 (it means that I don't want to type /app1 or app2 after IP address anymore).
Could you please tell me how to do that?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"javavina",
Your display name is not valid. Please see the rules on JavaRanch display names here.
Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile so that your display name complies to the naming rules.
You should also be aware that accounts with invalid display names get deleted without warning, and are not eligible for book give-aways.
thanks,
Dave.
 
Mark Stein
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are probably a couple of ways you can approach it, all dealing with the apache configuration. You gave an IP address rather than a domain name, so I'm guessing it's a local server.
Try configuing apache for two virtual hosts (you'll need to give each app an alias instead of a domain name), each pointing to a different app (you can use the same port that way). You could also try mod_rewrite.
MS
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic