Chinaunix首页 | 论坛 | 博客
  • 博客访问: 396626
  • 博文数量: 92
  • 博客积分: 3153
  • 博客等级: 中校
  • 技术积分: 780
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-03 16:26
文章存档

2011年(21)

2010年(71)

分类: LINUX

2010-08-23 10:38:18

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


阅读(1007) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~