WSO2 API管理器-在应用商店中显示专用IP

WSO2 API管理器-在应用商店中显示专用IP,ip,wso2,wso2esb,wso2carbon,wso2-am,Ip,Wso2,Wso2esb,Wso2carbon,Wso2 Am,我已经安装了API manager 1.6.0,并且还运行了API manager。然而,问题是存储中显示的IP地址是服务器的私有IP。通过VPN访问专用IP 下面是存储中显示为生产URL和沙盒URL的URL http://192.168.6.162:8280/railway/2.0 对于192.168.6.162,我已分配了一个公共IP,即103.11.35.xx,并分配了一个域我的域名 我想看到的是: http://my-domain-name/railway/2.0 如何配置API M

我已经安装了API manager 1.6.0,并且还运行了API manager。然而,问题是存储中显示的IP地址是服务器的私有IP。通过VPN访问专用IP

下面是存储中显示为生产URL和沙盒URL的URL

http://192.168.6.162:8280/railway/2.0
对于192.168.6.162,我已分配了一个公共IP,即
103.11.35.xx
,并分配了一个域
我的域名

我想看到的是:

http://my-domain-name/railway/2.0

如何配置API Manager以显示域名而不是带有端口的IP地址?

您可以从API-Manager.xml进行设置。在APIGateway部分下有一个GatewayEndpoint元素,您可以在其中指定应该在存储中显示的URL

<APIGateway>

<Environments>
            <Environment type="hybrid">
                    <Name>Production and Sandbox</Name>
                    <ServerURL>https://localhost:9445/services/</ServerURL>
                    <Username>admin</Username>
                    <Password>admin</Password>
    **<GatewayEndpoint>http://localhost:8282,https://localhost:8245</GatewayEndpoint>**
            </Environment>
    </Environments>

    <EnableGatewayKeyCache>true</EnableGatewayKeyCache>

<ClientDomainHeader>referer</ClientDomainHeader>

</APIGateway>

生产和沙箱
https://localhost:9445/services/
管理
管理
**http://localhost:8282,https://localhost:8245**
真的
推荐人

编辑位于WSO2-HOME/repository/conf中的api-manager.xml文件,并将网关端点设置为


生产和沙箱
https://${carbon.local.ip}:${mgt.transport.https.port}/services/
管理
管理
http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}

下面的配置适合我

您还可以使用Ws02 API Manager DNS条目或系统公共IP地址更改carbon.xml中的主机名值

"<HostName>{hostname}</HostName>"
“{hostname}”

这似乎对我不起作用。APIM1.6.0似乎也没有吐出任何类型的错误。
"<HostName>{hostname}</HostName>"