Cyb*_*ber 1 websphere websphere-liberty
我试图在Websphere LP server.xml文件中映射我的服务器公共IP地址,但当我试图从外部访问它时,我收到连接错误.我尝试给host ="localhost"并尝试从服务器本身访问,它工作正常.
我需要在Websphere LP中配置什么才能从外部访问它.
Server.xml文件
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>localConnector-1.0</feature>
</featureManager>
<httpEndpoint host="*" httpPort="8007" httpsPort="9443" id="defaultHttpEndpoint"/>
<applicationMonitor updateTrigger="mbean"/>
<library id="worklight-6.0.0">
<fileset dir="C:\IBM\Liberty\usr\shared\resources" includes="worklight-jee-library-6.0.0.jar"/>
</library>
<library id="apps-common">
<fileset dir="C:\IBM\Liberty\usr\shared\resources" includes="org.hsqldb.hsqldb_2.2.5.jar"/>
</library>
<application context-root="/DemoApp" id="DemoApplication" location="DemoApplication.war" name="DemoApplication" type="war">
<classloader commonLibraryRef="worklight-6.0.0,apps-common"/>
</application>
</server>
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏.
根据httpEndpoint配置元素的InfoCenter文档,此处:http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.doc/autodita/rwlp_metatype_4ic.html ?resultof =%22%68%74%74%70%65%6E%64%70%1207%69%6E%74%22%20个#mtFile121
主机名*将绑定到所有可用的网络接口 - 您不需要在Liberty端执行任何额外操作,我相信这可以回答您的问题.
将主机名设置为"localhost"意味着只能从您的计算机访问http端点.
使用提供的配置(hostName of*),这应该可以远程工作 - 因此可能是防火墙问题.
您可以检查/servers/yourServer/logs/messages.log文件以验证端点绑定到哪些接口 - 查找表单的消息
WWKO0219I:TCP Channel defaultHttpEndpoint已启动,现在正在侦听主机localhost(IPv4:127.0.0.1)端口9080上的请求.
| 归档时间: |
|
| 查看次数: |
6896 次 |
| 最近记录: |