有关如何为WSO2 API Manager配置公共域的任何准则。基本上想要用https://localhost:9043/publisher
替换http://api.test.com/publisher我们正在使用nginx。我们的问题是如何正确创建nginx conf。
答案 0 :(得分:0)
在虚拟服务器块
中将服务器名称定义为api.test.comserver {
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;
}
}
答案 1 :(得分:0)
此问题已得到解决。以上答案很有用。我卡住了,因为我没有打开443端口(机架空间新手)。