简体   繁体   English

为WSO2 API管理器配置公共域

[英]Configure public domain for WSO2 API Manager

Any guidelines on how to configure public domain for WSO2 API Manager. 有关如何为WSO2 API Manager配置公共域的任何准则。 Basically want to replace https://localhost:9043/publisher with http://api.test.com/publisher 基本上想将https:// localhost:9043 / publisher替换为http://api.test.com/publisher

We are using nginx. 我们正在使用nginx。 Our issue is how to correctly create the nginx conf. 我们的问题是如何正确创建nginx conf。

Defined the server name as api.test.com in the virtual server block 在虚拟服务器块中将服务器名称定义为api.test.com

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;
       }

}

This issue has been resolved. 此问题已得到解决。 the above answers were useful. 以上答案很有用。 I got stuck because I did not have port 443 open (new to rackspace). 我被卡住是因为我没有打开端口443(机架空间的新功能)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM