开发者

Multiple Tomcat Instance that runs as a service

I have an existing Tomcat Installation that is running on production mode right now. It runs as a windows service.

What I want is to add another tomcat instance but points to a different port but they both resides in the same Server Machine.

Can this be done without having to shutdown the other instance. I browse the web and I see some post that discusses how to setup multiple instance bu开发者_运维百科t according to them it only applies to Tomcat Installation that does not run as a windows service.

Any thoughts?


I am not familiar with how Tomcat runs as a service under Windows.

Generically, there's nothing stopping you from running multiple instances of Tomcat on a Windows machine, but there may be something in the service wrapper used by Tomcat. That may be the problem you're running in to.

That said.

If you only want to run a different web app on a different port, you can configure a Service, with the associated Connector, Engine, and Host, and deploy a Context within that Host to run your WAR. This way a single running instance of Tomcat will run both webapps on different ports.

Most of this work is simply Cut and Pasting the existing server.conf file for Tomcat, duplicating the Service entry and tweaking some port numbers.


In addition to Wills answer,
as I understand Tomcat, you need to adjust the ports in conf/server.xml

<Server port="8005" shutdown="SHUTDOWN">

and

<Connector port="8090" protocol="HTTP/1.1" .... >

to be unique.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜