【问题标题】:WSO2am change store/publisher/carbon urlWSO2am 更改商店/出版商/碳网址
【发布时间】: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-&gt;Browse-&gt;Resourcessection 下找不到/_system/governance/customurl/api-cloud/&lt;tenant-id&gt;/urlMapping/&lt;tenant-id&gt;

编辑

即使设置了这个

<HostName>demodomain.com</HostName> 

carbon.xml 重新启动后,我仍然看到以下内容。它仍在生成动态 IP。

【问题讨论】:

    标签: wso2 wso2-am


    【解决方案1】:

    编辑

    &lt;HostName&gt;demodomain.com&lt;/HostName&gt;

    carbon.xmldemodomain.com 中的 xml 标记。

    &lt;GatewayEndpoint&gt; 标签指的是您部署的 API 将在哪些端点上可用。

    【讨论】:

    • 它仍在生成动态 ips。请检查编辑。
    【解决方案2】:

    设置

    <HostName>demodomain.com</HostName>
    <MgtHostName>demodomain.com</MgtHostName>
    

    carbon.xml.

    【讨论】:

    • 它仍在生成动态 ips。请检查编辑。
    • 你确定你设置MgtHostName
    • carbon.xml 文件中的 HostName 和 MgtHostName 标签之间的区别是什么?
    • 好的。添加 MgtHostName 后,它使用该域名创建了 url。但我见过这个stackoverflow.com/questions/17577121/…。但是我是否也需要在我的主机文件中添加10.220.10.126 demodomain.com?..但在这种情况下,这意味着它仍在生成动态 url。所以有时我也需要更新我的主机文件?..我怎么知道 IP 呢?
    • 是不是我需要把机器IP像&lt;HostName&gt;10.220.10.126&lt;/HostName&gt;和域名像&lt;MgtHostName&gt;demodomain.com&lt;/MgtHostName&gt;然后在hosts文件中添加10.220.10.126 demodomain.com
    猜你喜欢
    • 2016-03-26
    • 2021-06-03
    • 1970-01-01
    • 2016-09-18
    • 1970-01-01
    • 2012-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多