文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Haproxy 配置示例

Haproxy 配置示例

时间:2010-08-23  来源:lksj

教务处两台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


相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载