ProxyPreserveHost 开启
<Location /stores/identityiq>
ProxyPass https://ncdlxxxasa0002:8443/identityiq
ProxyPassReverse https://ncdlxxxasa0002:8443/identityiq
</Location>
<Location /identityiq>
ProxyPass https://ncdlxxxasa0002:8443/identityiq
ProxyPassReverse https://ncdlixxxsa0002:8443/identityiq
</Location>
<Location />
ProxyPass https://ncdlxxxasa0002:8443/identityiq
ProxyPassReverse https://ncdlxxxasa0002:8443/identityiq
</Location>
我有上述三个基于位置的 Proxypass。第一个条件“/stores/identityiq”将输出上下文设置为“/identityiq”,该上下文被配置为第二个 Proxy pass 的源。因此,我最终被重定向到第二个条件的 ProxyPassReverse,而不是第一个条件。
我的意图是
case1:如果位置 /stores/identityiq/foo 输出必须是 /stores/identityiq/foo
case2:如果位置 /identityiq/foo 输出必须是 /identityiq/foo