haproxy 配置文件详解 之 配置文件示例
Posted yyxianren
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了haproxy 配置文件详解 之 配置文件示例相关的知识,希望对你有一定的参考价值。
此示例文件在haproxy1.8.20 测试没有问题:
global log 127.0.0.1 local0 info maxconn 4096 user nobody group nobody daemon nbproc 1 pidfile /usr/local/haproxy/logs/haproxy.pid defaults mode http retries 3 timeout connect 10s timeout client 20s timeout server 30s timeout check 5s frontend www bind *:80 mode http option httplog option forwardfor option httpclose log global #acl host_www hdr_dom(host) -i www.zb.com #acl host_img hdr_dom(host) -i img.zb.com #use_backend htmpool if host_www #use_backend imgpool if host_img default_backend htmpool backend htmpool mode http option redispatch option abortonclose balance static-rr cookie SERVERID option httpchk GET /index.jsp server 237server 192.168.81.237:8080 cookie server1 weight 6 check inter 2000 rise 2 fall 3 server iivey234 192.168.81.234:8080 cookie server2 weight 3 check inter 2000 rise 2 fall 3 backend imgpool mode http option redispatch option abortonclose balance static-rr cookie SERVERID option httpchk GET /index.jsp server host236 192.168.81.236:8080 cookie server1 weight 6 check inter 2000 rise 2 fall 3 listen admin_stats bind 0.0.0.0:9188 mode http log 127.0.0.1 local0 err stats refresh 30s stats uri /haproxy-status stats realm welcome login\ Haproxy stats auth admin:admin~!@ stats hide-version stats admin if TRUE
以上是关于haproxy 配置文件详解 之 配置文件示例的主要内容,如果未能解决你的问题,请参考以下文章
MyBatis Generator 配置文件详解 之 table 元素