[英]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.