IBM Websphere Liberty概要:如何在Websphere中映射公共IP地址

IBM Websphere Liberty概要:如何在Websphere中映射公共IP地址,websphere,websphere-liberty,Websphere,Websphere Liberty,我试图在Websphere LP server.xml文件中映射我的服务器公共ip地址,但当我试图从外部访问它时,我得到了一个连接错误。我尝试给host=“localhost”,并尝试从服务器本身访问,它工作正常 我需要在webspherelp中配置什么来从外部访问它吗 Server.xml文件 <server description="new server"> <!-- Enable features --> <featureManager>

我试图在Websphere LP server.xml文件中映射我的服务器公共ip地址,但当我试图从外部访问它时,我得到了一个连接错误。我尝试给host=“localhost”,并尝试从服务器本身访问,它工作正常

我需要在webspherelp中配置什么来从外部访问它吗

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> 

jsp-2.2
localConnector-1.0

非常感谢您的帮助。

根据httpEndpoint配置元素的信息中心文档,这里:

主机名*将绑定到所有可用的网络接口-您不需要在Liberty端执行任何额外操作,我相信这回答了您的问题

将主机名设置为“localhost”将意味着只能从您的计算机访问http端点

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

您可以检查/servers/yourServer/logs/messages.log文件以验证您的端点绑定到哪些接口-查找以下形式的消息

WWKO0219I:TCP通道defaultHttpEndpoint已启动,现在正在侦听主机localhost(IPv4:127.0.0.1)端口9080上的请求


你说的“外面”是什么意思?另一台机器还是另一个网络?你能从同一台机器上“通过IP”访问你的服务器吗?从另一个网络…我不能通过从服务器机器上提供我的服务器IP来访问我的服务器…但是如果我提供本地主机,我可以访问…请参阅更新的帖子,在server.xml文件中,我制作的是你的主机在外部机器/网络上“可见”吗?您是否有防火墙阻止8007端口?你会遇到什么样的连接错误?