WSO2 API 管理器 - 在 UI 中显示正确的 IP [英] WSO2 API Manager - Displaying correct IP in UI

查看:8
本文介绍了WSO2 API 管理器 - 在 UI 中显示正确的 IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已在单台机器上安装 API 管理器 1.4.0 并让一切运行起来.但是发现管理控制台和商店站点中显示的 IP 地址不正确.例如,在 mgnt 控制台主页中的主机"和服务器 URL",也在商店中的 api 页面上(在概述中提供的 URL 和在试用"功能中使用的 ip).

Have installed the API manager 1.4.0 on a single machine and got everything running. However have found the IP address shown within the management console and store sites are incorrect. For instance in the mgnt console home page the 'Host' and 'Server URL', also on an api's page in the store (both the URLs provides in the overview and the ip used in the 'try it' feature).

调查一下,我的网络适配器似乎提供了一个私人访问的 ip,而不是公共的(这无法更改).然后,该值会在组件之间启动时在 API 管理器中传播,同时也提供链接以从外部访问服务.

Looking into this it seems my network adapter is supplying a privately accessible ip, instead of public (this cannot be changed). This value is then propagated around the API manager on startup between components but also to provide links to access the services externally.

已查看配置并更改了一些值,但无法让 UI 中的所有 IP 都正确显示.我更改的设置包括..

Have looked into the configuration and changed some values, however cannot get all IP's in the UI to display correct. Settings I've changed include..

repositoryconfcarbon.xml HostName, MgtHostName, ServerURL

repositoryconfapi-manager.xml APIGateway-->APIEndpointURL (also updated APIKeyManager-->ThriftServerHost)

有没有办法解决这个问题?特别是,有没有一种方法可以设置一个 IP 以供外部访问,而无需更改用于主机内通信的任何配置?

Is there any way to solve this? In particular, is there a way to set an IP that will be published for external access without changing any configuration used for communications within the host?

推荐答案

我会使用域名而不是 IP 地址,然后先将其添加到您的 hosts 文件中,例如:

Instead of an IP address, I would use a domain name, and add it first to your hosts file like:

192.168.1.2 apimanager.example.net

然后编辑一些 carbon.xml 参数,如下所示:

Then edit some carbon.xml parameters to look like:

<HostName>apimanager.example.net</HostName>

<MgtHostName>apimanager.example.net</MgtHostName>

<ServerURL>https://apimanager.example.net:${carbon.management.port}${carbon.context}/services/</ServerURL>

这篇关于WSO2 API 管理器 - 在 UI 中显示正确的 IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆