小编典典
您需要修改Tomcat的配置(JBoss使用Tomcat的嵌入式版本)。
相关文件为:
$ $JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml
您可以在其中配置绑定端口的一部分。这是默认情况下的内容:
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
您可以添加几个“连接器”。您需要的每个端口一个。
然后重新启动您的JBoss。
您将在LOG上看到以下内容:
16:29:13,803 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
16:29:13,804 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8091
16:29:13,805 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8092
16:29:13,805 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8093
16:29:13,805 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8094
这是您需要在server.xml文件中添加的内容:
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
....
每个新端口一个XML标签。
2020-11-09