zoukankan      html  css  js  c++  java
  • HAProxy 配置文件

    
    global
        log         127.0.0.1 local2 info
        chroot      /var/lib/haproxy
        pidfile     /var/run/haproxy.pid
        maxconn     20480
        nbproc     8
        user        haproxy
        group       haproxy
        daemon
        stats socket /var/lib/haproxy/stats
    defaults
        mode                    http
        log                     global
        option                  httplog
        option                  dontlognull
        option http-server-close
        option forwardfor       except 127.0.0.0/8
        option                  redispatch
        retries                 3
        timeout http-request    10s
        timeout queue           1m
        timeout connect         10s
        timeout client          1m
        timeout server          1m
        timeout http-keep-alive 10s
        timeout check           10s
        maxconn                 3000
        stats refresh 30s
        stats realm Welcome Login Haproxy Statistics
        stats uri /haproxy-admin
        stats auth admin:admin~!@
        stats hide-version
        stats admin if TRUE
    
    frontend  Web_Service
        bind *:80
        mode http
        log global
        option httplog
        option forwardfor
        option httpclose
        option logasap
        option dontlognull
        #capture request header Host len 20
        #copture request header Referer len 20
        default_backend             web
    backend web
        mode http
        option redispatch
        option abortonclose
        balance source
        cookie SERVERID
        #option httpchk GET /index.html
        server  web1 192.168.199.203:80 cookie server1 weight 1 check inter 2000 rise 2 fall 3
        server  web2 192.168.199.204:80 cookie server2 weight 1 check inter 2000 rise 2 fall 3
     转载自:https://www.xwroot.com/archives/haproxy-%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6/
  • 相关阅读:
    wxpython 浏览器框架
    wxpython 开发播放器
    Docker学习(三)——Docker镜像使用
    Docker学习(二)——Docker容器使用
    SSL/TLS协议
    Https原理及证书管理
    证书及证书管理
    Docker学习(一)——安装docker
    Linux系统中安装软件方法总结
    Linux下删除的文件如何恢复
  • 原文地址:https://www.cnblogs.com/Wang-Hongwei/p/14709897.html
Copyright © 2011-2022 走看看