jboss支持远程访问配置

jboss有个特点,在本机启动之后,只能在本机的网页访问 http://localhost:8080,在其他机器上访问不了jboss服务。 

解决方法如下: 
在目录jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer下,编辑文件server.xml, 
<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" 

将${jboss.bind.address}改为0.0.0.0就可以了 

或者在启动jboss时加上参数 
run  -D jboss.bind.address=0.0.0.0 

这样也可以,不用改server.xml 

6.0以上版本配置: 
在standalone\configuration目录下的standalone.xml 
        <subsystem xmlns="urn:jboss:domain:webservices:1.1"> 
            <modify-wsdl-address>true</modify-wsdl-address> 
            <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host> 
            <endpoint-config name="Standard-Endpoint-Config"/> 
            <endpoint-config name="Recording-Endpoint-Config"> 
                <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM"> 
                    <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/> 
                </pre-handler-chain> 
            </endpoint-config> 
        </subsystem> 
        <subsystem xmlns="urn:jboss:domain:weld:1.0"/> 
    </profile> 

    <interfaces> 
        <interface name="management"> 
            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> 
        </interface> 
        <interface name="public"> 
            <inet-address value="${jboss.bind.address:127.0.0.1}"/> 
        </interface> 
        <interface name="unsecure"> 
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/> 
        </interface> 
    </interfaces> 
中修改

猜你喜欢

转载自www.cnblogs.com/h2zZhou/p/10000534.html