首页 > 解决方案 > Devportal 组合框中的“localhost”不使用我的 VMware 的 IP 地址,但页面的 URL 可以

问题描述

我已经在 Docker/VMware/Linux 上安装了 WSO2 API Manager 3.2,当我想测试从“ Devportal ”在“Publisher”上创建和发布的 API 时,选择 URL 地址的服务器组合框总是显示https://localhost: 8243/test/1.0,但我想要:https://xx27.197:8243/test/1.0

当我在 Postman 上测试相同的 URL(https://xx27.197:8243/test/1.0)时,它成功了!

非常感谢。

所附图片更多地描述了问题

标签: wso2wso2-amwso2carbon

解决方案


您是否尝试更改网关环境配置deployment.tomlhttp_endpoint您可以通过更新配置中的和值来更改网关 url 值https_endpoint

例如,

[[apim.gateway.environment]]
name = "Production and Sandbox"
type = "hybrid"
display_in_api_console = true
description = "This is a hybrid gateway that handles both production and sandbox token traffic."
show_as_token_endpoint_url = true
service_url = "https://localhost:${mgt.transport.https.port}/services/"
username= "${admin.username}"
password= "${admin.password}"
ws_endpoint = "ws://localhost:9099"
wss_endpoint = "wss://localhost:8099"
http_endpoint = "http://<your_ip>:${http.nio.port}"
https_endpoint = "https://<your_ip>:${https.nio.port}"

有关更多信息,请参阅


推荐阅读