我想在独立模式和域模式下将JBoss 7的默认端口更改为5050:
http://localhost:5050
在独立模式下,我只需在standlone.xml中更改以下属性:
<socket-binding name="http" port="5050"/>
但是,在域模式下,我可以选择仅更改host.xml中的偏移量:
<server name="server-one" group="main-server-group">
<!-- Remote JPDA debugging for a specific server
<jvm name="default">
<jvm-options>
<option value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"/>
</jvm-options>
</jvm>
-->
<socket-bindings port-offset="5"/>
</server>
<server name="server-two" group="main-server-group" auto-start="true">
<!-- server-two avoids port conflicts by incrementing the ports in
the default socket-group declared in the server-group -->
<socket-bindings port-offset="10"/>
</server>
当我尝试设置负的端口偏移量时,启动脚本抛出一个错误。如何在域模式下将端口从8080改为5050?
发布于 2017-03-09 17:59:17
在host.xml中为"jboss.http.port“创建系统属性,如下所示:
<server name="server-two" group="main-server-group" auto-start="true">
<system-properties>
<property name="jboss.http.port" value="4950" boot-time="true"/>
</system-properties>
<socket-bindings port-offset="100"/>
</server>
只需确保必须从5050中减去端口偏移值。
https://stackoverflow.com/questions/42465080
复制