此示例文件在haproxy1.8.20 测试没有问题:

global
log 127.0.0.1 local0 info
maxconn
user nobody
group nobody
daemon
nbproc
pidfile /usr/local/haproxy/logs/haproxy.pid defaults
mode http
retries
timeout connect 10s
timeout client 20s
timeout server 30s
timeout check 5s frontend www
bind *:
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 SESSION_COOKIE insert indirect nocache
option httpchk GET /index.jsp
server 237server 192.168.81.237: cookie server1 weight check inter rise fall
server iivey234 192.168.81.234: cookie server2 weight check inter rise fall backend imgpool
mode http
option redispatch
option abortonclose
balance static-rr
cookie SERVERID
option httpchk GET /index.jsp
server host236 192.168.81.236: cookie server1 weight check inter rise fall listen admin_stats
bind 0.0.0.0:
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 配置文件详解 之 配置文件示例的更多相关文章

  1. zabbix配置文件详解

    Zabbix之配置文件详解   zabbix配置文件种类: zabbix_server配置文件zabbix_server.conf zabbix_proxy配置文件zabbix_proxy.conf ...

  2. nginx高性能WEB服务器系列之四配置文件详解

    nginx系列友情链接:nginx高性能WEB服务器系列之一简介及安装https://www.cnblogs.com/maxtgood/p/9597596.htmlnginx高性能WEB服务器系列之二 ...

  3. Spring 2.5配置文件详解(转)

    http://book.51cto.com/art/201004/193743.htm 6.2.3  Spring 2.5配置文件详解 Spring配置文件是用于指导Spring工厂进行Bean生产. ...

  4. Apache服务的主要目录和配置文件详解

    Apache服务的主要目录和配置文件详解 2014-01-14 19:05:14 标签:httpd配置文件详解 apache配置文件 httpd配置文件 apache文件目录 原创作品,允许转载,转载 ...

  5. haproxy 安装与配置文件详解

    本文主要阐述haproxy的安装配置详解,对于它的概念,作用,功能,和其它LB软件的区别,优点,缺点等不再进行说明. 一. haproxy 的安装配置 # cat /etc/redhat-releas ...

  6. Haproxy均衡负载部署和配置文件详解

    HAproxy均衡负载部署和配置文件详解 HAProxy提供高可用性.负载均衡以及基于TCP和HTTP应用的代理,支持虚拟主机,它是免费.快速并且可靠的一种解决方案.根据官方数据,其最高极限支持10G ...

  7. keepalived原理(主从配置+haproxy)及配置文件详解

    下图描述了使用keepalived+Haproxy主从配置来达到能够针对前段流量进行负载均衡到多台后端web1.web2.web3.img1.img2.但是由于haproxy会存在单点故障问题,因此使 ...

  8. spring配置文件详解--真的蛮详细

    spring配置文件详解--真的蛮详细   转自: http://book.51cto.com/art/201004/193743.htm 此处详细的为我们讲解了spring2.5的实现原理,感觉非常 ...

  9. (原创)LAMP搭建之二:apache配置文件详解(中英文对照版)

    LAMP搭建之二:apache配置文件详解(中英文对照版) # This is the main Apache server configuration file. It contains the # ...

随机推荐

  1. 2018 ACM-ICPC徐州站网络赛 G题

    There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xxx , yy ...

  2. js中的方法如何传入多个参数

    js中的方法如何传入多个参数 $(function () { let parameter1 = 1; let parameter2 = 'Hello World'; let parameter3 = ...

  3. JS修改URL参数,并修改前页面的地址

    function changeURLArg(url,arg,arg_val){ var pattern=arg+'=([^&]*)'; var replaceText=arg+'='+arg_ ...

  4. 『kamp 树形dp』

    kamp Description jz 市的云台山是个很美丽的景区,小 x 暑期到云台山打工,他的任务是开景区的大巴. 云台山景区有 N 个景点,这 N 个景点由 N-1 条道路连接而成,我们保证这 ...

  5. Linux环境下如何计算CPU占用率【华为云技术分享】

    1.Linux 环境下查看 CPU 信息 1.1.查看 CPU 详细信息 通过 cat /proc/cpuinfo 命令,可以查看 CPU 相关的信息: [root@rh ~]$ cat /proc/ ...

  6. SQL参数化出现执行慢问题

    问题: 应用程序通过参数化访问数据库时出现执行效率慢,直接通过语句查时秒出结果,通过参数化查询时用时是前者的几十上百倍. 排查:1.使用了错误的执行计划; 解决:清除缓存的执行计划(未能解决上面问题) ...

  7. 关于SQL server事务

  8. contos7自启动django服务

    研究了很多种办法 1.新建一个sh 文件 vi django_autostart.sh 2.编辑文件内容 #!/bin/bash #chkconfig:345 61 61 //此行的345参数表示,在 ...

  9. Android源码分析(十六)----adb shell 命令进行OTA升级

    一: 进入shell命令界面 adb shell 二:创建目录/cache/recovery mkdir /cache/recovery 如果系统中已有此目录,则会提示已存在. 三: 修改文件夹权限 ...

  10. 01篇ELK日志系统——升级版集群之elasticsearch集群的搭建

    [ 前言:以前搭了个简单的ELK日志系统,以我个人的感觉来说,ELK日志系统还是非常好用的.以前没有弄这个ELK日志系统的时候,线上的项目出了bug,报错了,要定位错误是什么,错误出现在哪个java代 ...