[英]Configure public domain for WSO2 API Manager
有关如何为WSO2 API Manager配置公共域的任何准则。 基本上想将https:// localhost:9043 / publisher替换为http://api.test.com/publisher
我们正在使用nginx。 我们的问题是如何正确创建nginx conf。
在虚拟服务器块中将服务器名称定义为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;
}
}
此问题已得到解决。 以上答案很有用。 我被卡住是因为我没有打开端口443(机架空间的新功能)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.