I have a web application deployed and running on Tomcat at port 8080. Shutdown port is 8005 and AJP Connector is on Port 8009. I want to deploy another application on SAME INSTANCE and run it at different port. Convinced that it is possible, I made following changes in my $CATALINA_HOME/conf/server.xml:
Uncommented following in the xml file: <Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />
Now how to deploy my second application so that it listens to 8443 and not at 8080. Which ever application starts first takes 8080 and second application complains of busy port.
Can someone please tell me the procedure of configuring tomcat to run different applications on different ports? Thanks.
Thanks for your ideas. I tried configuring virtual hosts on Tomcat, but without success. I followed everything on this page. Created a directory named $CATALINA_HOME/conf/Catalina/cab and here is part of my server.xml:
I even put a ROOT.xml in this directory, even though Tomcat 5.5 doesn't have any.(It wasn't working without it as well!) created a directory $CATALINA_HOME/webapps/cab also and copied a webapp in this directory. But when I give http://10.xxx.xxx.xxx:8080/cab/appname I get
Now what have I done wrong here! Any clues please. Thanks
Are you trying to create another host or just another app?
If you just want to create another webapp, you don't need to configure anything.
Simply create a cab directory in webapps and create a WEB-INF directory inside cab and you're done.
Joined: Sep 08, 2004
Yes I am trying to create another host.
Author and all-around good cowpoke
Joined: Mar 22, 2000
I run a number of hosts on a Tomcat instance. In my <Host tags I give a complete path for the appBase where you appear to be trying to use some sort of relative address.
Also note that the name attribute has to be the exact way the host is addressed in URLs - if you want to address http://www.cab.com then www.cab.com should be the name.
Your use of /cab/cabinetroot/resourcemanager is NOT addressing another host but an application to be found under a cab directory in the default host.
Joined: Sep 08, 2004
Thanks a ton for your response. After reading your answer I realized what an idiot I was trying to access the application with that URL. I was able to set up virtual host for my tomcat instance.
Thanks a lot.
Just for the sake of completeness of information on this thread: If you are not using any web server, then you need to manage the host information also. In my case, I added following line to Hosts file on Windows XP. You can see more info here.