wso2 API管理器。重定向到本地主机

时间:2020-03-02 09:07:08

标签: wso2 localhost wso2-am

请帮助 我安装了wso2 APIM,现在进行配置。我创建了新的REST API,然后输入URL“在Dev Portal中查看”,为我重定向到localhost 我在Deployment.toml(ip-addr)中更改了主机名。为什么要为我重定向到本地主机?

4 个答案:

答案 0 :(得分:2)

取消注释并更新此配置。

gson.fromJson

答案 1 :(得分:0)

感谢蜜蜂的回答,

制造成功,但不起作用。

[apim.devportal]
url = "https://192.168.3.148:${mgt.transport.https.port}/devportal"
#enable_application_sharing = false
#if application_sharing_type, application_sharing_impl both defined priority goes to application_sharing_impl
#application_sharing_type = "default" #changed type, saml, default #todo: check the new config for rest api
#application_sharing_impl = "org.wso2.carbon.apimgt.impl.SAMLGroupIDExtractorImpl"
#display_multiple_versions = false
#display_deprecated_apis = false
#enable_comments = true
#enable_ratings = true
#enable_forum = true

答案 2 :(得分:0)

摘自文档:

By default, WSO2 products identify the hostname of the current machine through the Java API. However, this value sometimes yields erroneous results on some environments. Therefore, users are recommended to configure the hostname. The following procedure explains how to change the hostname and management hostname of WSO2 API Manager (WSO2 API-M) as required for your production environment.

Update the deployment.toml file.

Open the <API-M_HOME>/repository/conf/deployment.toml file

Define the hostname attribute under server configurations as shown below.

Format

[server]
hostname = "{hostname}"
Example
{hostname} - Hostname or IP address of the machine hosting this server. This is will become part of the End Point Reference of the services deployed on this server instance.

Configure the Developer Portal URL, which is used to access the Developer Portal via the Publisher.

Uncomment the following configuration and define the hostname.


[apim.devportal]
url = "https://<hostname>:${mgt.transport.https.port}/devportal"
Generate a key store, export the public certificate from the keystore, and import that certificate to the client­-truststore.jks file.

For more information, see Creating New Keystores.

Restart the server.

如果我更改了主机名并写入Deployment.toml,我应该生成新的密钥库吗?

答案 3 :(得分:0)

登录到Carbon控制台(/ carbon)并转到服务提供商,然后选择Store / Dev Portal作为Application,然后展开Inbound Authentication Configuration,然后单击edit。它将打开入站身份验证配置,通过将localhost替换为IP /主机名来编辑回调URL并进行更新。

现在,开发门户将不会重定向到本地主机。

发布者也是如此。