教务处两台web服务器210.45.176.81 210.45.176.82 ,配置如下:
global log 127.0.0.1 local0 info #[err warning info debug] maxconn 4096 user haproxy group haproxy daemon nbproc 1 pidfile /tmp/haproxy.pid defaults maxconn 10000 contimeout 5000 clitimeout 30000 srvtimeout 30000
frontend jiaowu bind 0.0.0.0:80 mode http log global option httplog option httpclose option forwardfor capture request header Host len 40 capture request header Content-Length len 10 capture request header Referer len 200 capture response header Server len 40 capture response header Content-Length len 10 capture response header Cache-Control len 8 acl tm_policy hdr_dom(host) -i zftet.ahau.edu.cn use_backend jiaowu_server if tm_policy
backend jiaowu_server mode http balance leastconn server 81 210.45.176.81:80 check inter 1500 rise 3 fall 3 server 82 210.45.176.82:80 check inter 1500 rise 3 fall 3
listen status bind 0.0.0.0:1080 mode http log 127.0.0.1 local0 err stats refresh 30s stats uri /stat stats realm Ahau\ Haproxy stats auth root:redhat stats hide-version log 127.0.0.1 local0 err
listen site_status bind 0.0.0.0:1081 mode http monitor-uri /site_status acl site_dead nbsrv(tm_server) lt 1 monitor fail if site_dead monitor-net 210.45.176.0/24
|
阅读(1041) | 评论(0) | 转发(0) |