[英]How to configure Wildfly load balancing with redirect
我正在使用 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>
我在這里做的錯誤是,我的負載均衡器啟用了 ssl,我通過 8443 與 keycloak 通信,期望負載均衡器和 keycloak 都具有相同的證書。 因此,為了擺脫這種情況,我通過 8080 端口連接到 keycloak,並且僅使用負載均衡器啟用了 ssl。 因此,在更改以下代碼后,它對我有用:
<outbound-socket-binding name="remote-host">
<remote-destination host="192.168.1.5" port="8080"/>
</outbound-socket-binding>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.