Jboss默认只能自己内网访问,即通过:http://localhost:8082/b2cPlatform/可以访问 ,
但是通过:http://192.168.10.162:8082/b2cPlatform/不能访问。
如何配置外网访问Jboss工程:
1.找打Jboss的安装目录,我的是:F:\jboss-4.2.3\server\default\deploy\jboss-web.deployer\server.xml
2.找到里面的 Define a non-SSL HTTP/1.1 Connector on port 8080标签,修改address为'0.0.0.0'
8082是我的默认端口,如下:
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<!-- address="${jboss.bind.address}"将默认的bind.address改为"0.0.0.0" -->
<Connector port="8082" address="0.0.0.0"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>