【发布时间】:2017-08-30 10:43:42
【问题描述】:
我已经安装了 wso2am。启动服务后,它给了我 3 个网址。
1) 商店 2) 出版商 3) 碳
Now i need to set a domain name rather than IP address in the URLs. 我想在本地机器上做(刚刚添加了 wso2am 根文件夹并运行 wso2server.bat 文件)。
<APIGateway>
<Environments>
<Environment type="hybrid" api-console="true">
<Name>Production and Sandbox</Name>
<Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>
<ServerURL>https://demodomain.com:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
<Username>${admin.username}</Username>
<Password>${admin.password}</Password>
<GatewayEndpoint>http://demodomain.com:${http.nio.port},https://demodomain.com:${https.nio.port}</GatewayEndpoint>
</Environment>
</Environments>
</APIGateway>
这里demodomain.com 是我使用的域名,而不是localhost 或wso2 分配的任何IP。
在此之后我重新启动服务器并再次 wso2 为我提供带有 IP 的 URL。它没有使用demodomain.com。如果我尝试使用该域名访问 store/publisher/carbon,它不会加载。
有什么想法吗?
编辑
我已经通过https://docs.wso2.com/display/AM200/Customize+the+API+Store+and+Gateway+URLs 这个。但似乎已经过时了。我在carbon->Browse->Resourcessection 下找不到/_system/governance/customurl/api-cloud/<tenant-id>/urlMapping/<tenant-id>。
编辑
即使设置了这个
<HostName>demodomain.com</HostName>
在carbon.xml 重新启动后,我仍然看到以下内容。它仍在生成动态 IP。
【问题讨论】: