首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为WSO2应用编程接口管理器配置公用域

为WSO2应用编程接口管理器配置公用域
EN

Stack Overflow用户
提问于 2017-02-05 01:09:15
回答 2查看 59关注 0票数 0

有关如何为WSO2应用编程接口管理器配置公共域的任何指南。基本上我想用http://api.test.com/publisher替换https://localhost:9043/publisher

我们使用nginx。我们的问题是如何正确创建nginx conf。

EN

回答 2

Stack Overflow用户

发布于 2017-02-06 17:21:52

已在虚拟服务器块中将服务器名称定义为api.test.com

代码语言:javascript
复制
server {

       listen 443;
       ssl on;
       ssl_certificate /etc/nginx/ssl/nginx.crt;
       ssl_certificate_key /etc/nginx/ssl/nginx.key;
       server_name api.test.com;

    location /publisher {         
           proxy_set_header X-Forwarded-Host $host;
           proxy_set_header X-Forwarded-Server $host;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_pass https://localhost:9443/publisher;
           proxy_redirect  https://localhost:9443/publisher  https://localhost/apimanager/publisher;
           proxy_cookie_path /publisher /apimanager/publisher;

        }

       location ~ ^/publisher/(.*)registry/(.*)$ {         
           proxy_set_header X-Forwarded-Host $host;
           proxy_set_header X-Forwarded-Server $host;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_pass https://localhost:9443/$1registry/$2;
       }

}
票数 0
EN

Stack Overflow用户

发布于 2017-02-07 02:26:32

此问题已解决。上面的答案很有用。我被卡住了,因为我没有打开端口443 (rackspace的新功能)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42043132

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档