首页 > 其他 > 详细

haproxy最简配置

时间:2016-04-27 14:23:49      阅读:191      评论:0      收藏:0      [点我收藏+]
global
    log         127.0.0.1 local2 info
    pidfile     /var/run/haproxy.pid
    chroot    /var/lib/haproxy
    maxconn     100000
    user        haproxy
    group       haproxy
    daemon
    nbproc      1

defaults
    mode                    http
    retries                 3
    timeout connect         10s
    timeout client          50s
    timeout server          50s
    maxconn                 10000

listen stats
    bind 0.0.0.0:8888
    stats enable
    stats hide-version
    stats refresh       30s
    stats uri   /haproxy-status
    stats auth  haproxy:haproxy

frontend frontend_www
    bind 192.168.1.60:80
    default_backend backend_www
backend backend_www
    option forwardfor
    option httpchk HEAD / HTTP/1.0
    balance source
    server www1 192.168.1.198:80 check inter 2000 rise 30 fall 15
    server www2 192.168.1.52:80 check inter 2000 rise 30 fall 15


haproxy最简配置

原文:http://chboy.blog.51cto.com/9959876/1768134

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!