2013-09-23 68 views
1

我试图在Websphere LP server.xml文件中映射我的服务器公共IP地址,但是当我尝试从外部访问它时,出现连接错误。我试图给主机=“本地主机”,并试图从服务器本身访问,它工作正常。IBM Websphere Liberty Profile:如何在Websphere中映射公有IP地址

有什么我需要在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> 

任何帮助表示赞赏。

+0

你说的“外”是什么意思?另一台机器或另一个网络?你能否从同一台机器上“通过IP”访问你的服务器? –

+0

从另一个网络....我无法通过从服务器机器给我的服务器ip访问我的服务器.....但如果我给本地主机我可以访问... – Cyber

+0

请参阅更新的帖子,在Server.xml文件我使 Cyber

回答

5

按照该httpEndpoint配置元素,这里的信息中心文档: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%6f%69%6e%74%22%20#mtFile121

的* A主机将绑定到所有可用网络接口 - 你不需要做任何额外的自由方面,我相信回答你的问题。

将主机名设置为'localhost'将意味着http端点只能从您的机器访问。

使用提供的配置(*的主机名),这应该远程工作 - 所以它可能是防火墙问题。

您可以检查/servers/yourServer/logs/messages.log文件,以验证其接口的端点结合 - 寻找

WWKO0219I形式的消息:TCP通道defaultHttpEndpoint已启动现在正在监听的主机本地主机请求(IPv4的:127.0.0.1)端口9080

相关问题