You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何配置WSO2 API Manager以HTTP运行及解决配置被覆盖问题

让WSO2 APIM 4.1.0运行在HTTP协议的配置方法

你直接修改catalina-server.xml后被自动还原,是因为WSO2 APIM 4.1.0用deployment.toml作为核心配置入口,启动时会根据该文件自动生成catalina-server.xml,直接修改后者会被覆盖。正确的配置步骤如下:

1. 修改核心配置文件deployment.toml

路径:/wso2am-4.1.0/repository/conf/deployment.toml

  • 添加HTTP连接器配置,指定HTTP端口(示例用8080,可按需修改):
[transport.http.properties]
port = 8080
  • 若仅需保留HTTP协议,可注释或移除HTTPS相关配置(可选):
# [transport.https.properties]
# port = 9443
# keystore_file = "${carbon.home}/repository/resources/security/wso2carbon.jks"
# keystore_password = "wso2carbon"
# key_password = "wso2carbon"
  • 配置管理控制台的HTTP访问地址:
[carbon.ui]
url = "http://localhost:8080"

2. 配置API网关的HTTP服务

同样在deployment.toml中添加或修改网关配置,让API流量走HTTP:

[apim.gateway.environment]
service_url = "http://localhost:8280"
ws_service_url = "ws://localhost:8290"

3. 验证配置生效

启动APIM后,检查/wso2am-4.1.0/repository/conf/tomcat/catalina-server.xml,确认已生成正确的HTTP连接器节点。同时访问http://localhost:8080/carbon,能正常打开管理控制台即说明配置生效。

注意:无需修改default.json,该文件是默认配置模板,核心配置都通过deployment.toml管理即可。

内容的提问来源于stack exchange,提问作者Jafor Iqbal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 19:45:50