1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/xiangyu123-centos6.5_init

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
haproxy.cfg 4.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
xuzhigui Отправлено 15.06.2015 18:48 2a4f243
#test
# this config needs haproxy-1.1.28 or haproxy-1.2.1
global
log 127.0.0.1 local0
#log 127.0.0.1 local1 notice
#log 127.0.0.1 local1 info
maxconn 8192
chroot /usr/share/haproxy
uid 99
gid 99
daemon
nbproc 8
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
option abortonclose
option forwardfor
maxconn 8192
timeout connect 10000
timeout client 300000
timeout server 300000
frontend web_in
bind :80
acl cdata hdr_beg(host) -i cdata.haibian.com
acl tiku hdr_beg(host) -i admin.q.haibian.com
acl admin hdr_beg(host) -i admin.haibian.com
acl mapi hdr_beg(host) -i mapi.haibian.com
use_backend cdata_web if cdata
use_backend haibian_admin if admin
use_backend tiku_web if tiku
use_backend mapi_web if mapi
default_backend all_web
rspidel ^Set-cookie:\ IP=
rspidel ^X-Page-Speed:\ 1.9
rspidel ^Server:\ nginx
rspadd Server:\ haibian-web/1.0
backend all_web
stats uri /haproxy
stats realm Haproxy \ statistic #统计页面密码框上提示文本
stats auth haproxyadmin:haproxypass #统计页面用户名和密码设置
stats hide-version #隐藏统计页面上HAProxy的版本信息
balance roundrobin
option httpclose
option httpchk HEAD /check_nginx HTTP/1.0\r\nHost:www.haibian.com
server web1 192.168.12.230:80 check inter 2000 rise 2 fall 3
server web2 192.168.12.231:80 check inter 2000 rise 2 fall 3
errorfile 503 /usr/local/haproxy/errors/503.http
backend haibian_admin
stats uri /haproxy
stats realm Haproxy \ statistic #统计页面密码框上提示文本
stats auth haproxyadmin:haproxypass #统计页面用户名和密码设置
stats hide-version #隐藏统计页面上HAProxy的版本信息
balance roundrobin
option httpclose
option httpchk HEAD /check_nginx HTTP/1.0\r\nHost:admin.haibian.com
#cookie SRV_ID prefix #This is not test
#server web1 192.168.12.230:80 cookie check inter 2000 rise 2 fall 3
#server web2 192.168.12.231:80 cookie check inter 2000 rise 2 fall 3
server web1 192.168.12.230:80 check inter 2000 rise 2 fall 3
server web2 192.168.12.231:80 check inter 2000 rise 2 fall 3 backup
errorfile 503 /usr/local/haproxy/errors/503.http
backend mapi_web
stats uri /haproxy
stats realm Haproxy \ statistic #统计页面密码框上提示文本
stats auth haproxyadmin:haproxypass #统计页面用户名和密码设置
stats hide-version #隐藏统计页面上HAProxy的版本信息
balance roundrobin
option httpclose
option httpchk HEAD /check_nginx HTTP/1.0\r\nHost:mapi.haibian.com
server web1 192.168.12.230:80 check inter 2000 rise 2 fall 3
server web2 192.168.12.231:80 check inter 2000 rise 2 fall 3
errorfile 503 /usr/local/haproxy/errors/503.http
backend cdata_web
stats uri /haproxy
stats realm Haproxy \ statistic #统计页面密码框上提示文本
stats auth haproxyadmin:haproxypass #统计页面用户名和密码设置
stats hide-version #隐藏统计页面上HAProxy的版本信息
balance roundrobin
option httpclose
option httpchk HEAD /check_nginx HTTP/1.0\r\nHost:cdata.haibian.com
server webapp1 192.168.12.233:80 check inter 2000 rise 2 fall 3
server webapp2 192.168.12.234:80 check inter 2000 rise 2 fall 3
backend tiku_web
stats uri /haproxy
stats realm Haproxy \ statistic #统计页面密码框上提示文本
stats auth haproxyadmin:haproxypass #统计页面用户名和密码设置
stats hide-version #隐藏统计页面上HAProxy的版本信息
balance roundrobin
option httpclose
# cookie TIKU prefix
option httpchk HEAD /check_nginx HTTP/1.0\r\nHost:admin.q.haibian.com
# server tikuweb1 192.168.12.238:80 cookie check inter 2000 rise 2 fall 3
# server tikuweb2 192.168.12.239:80 cookie check inter 2000 rise 2 fall 3
server web1 192.168.12.238:80 check inter 2000 rise 2 fall 3
server web2 192.168.12.239:80 check inter 2000 rise 2 fall 3 backup
listen monitor 0.0.0.0:8888 #监控页面的端口
mode http
transparent
stats refresh 30s #统计页面自动刷新时间
stats uri /haproxy-stats #监控页面的访问地址
stats realm Haproxy \ statistic #统计页面密码框上提示文本
stats auth haproxyadmin:haproxypass #统计页面用户名和密码设置
stats hide-version #隐藏统计页面上HAProxy的版本信息

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/xiangyu123-centos6.5_init.git
git@api.gitlife.ru:oschina-mirror/xiangyu123-centos6.5_init.git
oschina-mirror
xiangyu123-centos6.5_init
xiangyu123-centos6.5_init
master