我正在使用wildfly undertow负载均衡器,我在standalone- load -balancer.xml中添加了以下配置,但我的请求没有被重定向?我将反向代理处理程序和主机添加到Undertow子系统:
<handlers>
<reverse-proxy name="keycloak-handler">
<host name="keycloak-host" outbound-socket-binding="remote-host" path="/auth"/>
</reverse-proxy>
</handlers>然后,我将远程主机的出站套接字绑定定义为:
<outbound-socket-binding name="remote-host">
<remote-destination host="192.168.1.5" port="8443"/>
</outbound-socket-binding>然后将反向代理添加到位置,如下所示:
<host name="default-host">
<location name="/auth" handler="keycloak-handler"/>
<filter-ref name="load-balancer"/>
</host>发布于 2019-03-11 14:17:31
我在这里犯的错误是,我的负载均衡器启用了ssl,并且我通过8443与keycloak通信,8443期望负载均衡器和keycloak都使用相同的证书。因此,为了摆脱这个问题,我已经通过8080端口连接到了keycloak,并且我只使用负载均衡器启用了ssl。因此,在更改以下代码后,它对我起作用了:
<outbound-socket-binding name="remote-host">
<remote-destination host="192.168.1.5" port="8080"/>
</outbound-socket-binding>https://stackoverflow.com/questions/54289198
复制相似问题