码迷,mamicode.com
首页 > 其他好文 > 详细

haproxy最简配置

时间:2016-04-27 14:23:58      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:haproxy.cfg

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最简配置

标签:haproxy.cfg

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!