Assumptions -
- Assume you have a development host with two host names, localhost and localhost1(You will need to create a hosts file entry for this or you can simply put the LAN ip address if you want).
- Let's also assume one instance of Tomcat running, so
$CATALINA_HOMErefers to wherever it's installed, may be some where in /var/lib/tomcat7 (Please use it according to the location and the operating system you are using )
What to change??
- Definitely server.xml !!!
- You will find server.xml in /var/lib/tomcat7/conf/server.xml or you may use find command if you have no idea where you will get it. For the list of commands in linux and their brief summary please check here
Default entry in server.xml is
<Engine defaulthost="localhost" name="Catalina"></Engine>
You need to add this -
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"/>
<Host name="localhost1" appBase="my_webapps"/>
</Engine>
No comments:
Post a Comment