我是Ha-proxy的新手,陷入困境。在码头配置ha-proxy“war”文件
我为两台服务器10.x.y.10和10.x.y.20配置了ha-proxy。这两个运行码头。
如果其中一个码头发生故障,一切正常。请求转到第二台服务器,一切都按预期发生。
问题:假设两个码头都在运行,并且如果我从一个码头中删除“war”文件,请求不会转到第二个服务器。它只是给出错误“错误404未找到”
我知道我已配置码头的ha代理不是为战争文件,但有没有任何方式来重定向请求,如果战争文件丢失或所需的情况是不均匀可能。
请指点我正确的方向。
在此先感谢。
这是我的haproxy配置。
HA代理配置
defaults
mode http
log global
option httplog
option logasap
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend vs_http_80
bind *:9090
default_backend pool_http_80
backend pool_http_80
#balance options
balance roundrobin
#http options
mode http
option httpchk OPTIONS/
option forwardfor
option http-server-close
#monitoring service endpoints with healthchecks
server pool_member1 10.x.y.10:8080 // x and y are dummy variables
server pool_member2 10.x.y.20:8080
frontend vs_stats :8081
mode http
default_backend stats_backend
backend stats_backend
mode http
stats enable
stats uri /stats
stats realm Stats\ Page
stats auth serveruser:password
stats admin if TRUE