为什么NGINX将"/publisher"资源附加到我的请求中





我正在从Apache到NGINX再到前端我的WSO2环境。所以现在我卡在商店前端配置文件中。
在这一点上,我有这样的商店.conf:

server {
listen 443 ssl;
server_name storedomain.com;
proxy_set_header X-Forwarded-Port 443;
error_log  /var/log/nginx/store.log ;
access_log /var/log/nginx/access-store;
#SSL CONFIG
...
location /{
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_set_header Host $http_host;
proxy_read_timeout 5m;
proxy_send_timeout 5m;
proxy_pass https://storenode:9443;
proxy_redirect default;
proxy_cookie_path /store/ /;
}
}

我的商店site.json 文件具有以下反向代理配置:

"reverseProxy" : {
"enabled" : true,    // values true , false , "auto" - will look for  X-Forwarded-* headers
"host" : "storedomain.com", // If reverse proxy do not have a domain name use IP
"context":"",
//"regContext":"" // Use only if different path is used for registry
},

现在,在任何请求中 https://storedomain.com/NGINX都附加了"/publisher",这让我发疯。
我还有其他用于网关,iskm,发布者节点的.conf文件,结束了这只发生在商店nginx配置中。 为什么?如何解决?

附言 以下代码它是一个工作正常的阿帕奇会议文件....

<VirtualHost storedomain.com:443>
SSLEngine on
.....
CustomLog /var/log/httpd/store.log combined
ErrorLog /var/log/httpd/store.error.log
ServerName storedomain.com
# disable forward proxy requests
ProxyRequests off
SSLProxyEngine On
#SSLProxyVerify off
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPreserveHost On
UseCanonicalName On
ProxyPass / https://stroenode:9443/store/
ProxyPassReverse / https://stroenode:9443/store/
ProxyPassReverseCookiePath "/store" "/"
ProxyPass /registry https://stroenode:9443/registry/
ProxyPassReverse /registry https://stroenode:9443/registry/
ProxyPass /services https://stroenode:9443/services
ProxyPassReverse /services https://stroenode:9443/services
ProxyPass /apis https://stroenode:9763/api/am/store/v0.14/apis
ProxyPassReverse /apis https://stroenode:9763/api/am/store/v0.14/apis
ProxyPass /store https://stroenode:9763/store/
ProxyPassReverse /store https://stroenode:9763/store/
</VirtualHost>

正如官方文档 (https://docs.wso2.com/display/AM220/Directing+the+Root+Context+to+the+API+Store( 中所揭示的那样,这是 APIM 的正常行为。您可以按如下方式更改此巴哈维:

1-打开捆绑包/存储库/组件/插件/org.wso2.am.styles_1.x.x.jar。
2-打开META-INF目录中的组件.xml文件。
3-将默认情况下指向发布者的元素更改为存储:

<context>
<context-id>default-context</context-id>
<context-name>store</context-name>
<protocol>http</protocol>
<description>API Publisher Default Context</description>
</context>

4-压缩JAR并将其放回/repository/components/plugins目录中。
5-重新启动服务器。

最新更新