haproxy笔记之五:一个配置示例
2024-10-08 21:00:10
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# ) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# ) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
log 127.0.0.1 local2 chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn
user haproxy
group haproxy
daemon defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/
option redispatch
retries
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 listen stats
mode http
bind 0.0.0.0:
stats enable
stats hide-version
stats uri /haproxyadmin?stats
stats realm Haproxy\ Statistics
stats auth admin:admin
stats admin if TRUE frontend http-in
bind *:
mode http
log global
option httpclose
option logasap
option dontlognull
capture request header Host len
capture request header Referer len
default_backend servers frontend healthcheck
bind :
mode http
option httpclose
option forwardfor
default_backend servers backend servers
balance roundrobin
server websrv1 192.168.10.11: check maxconn
server websrv2 192.168.10.12: check maxconn
最新文章
- python基础一
- Could not find a getter for id in class 的异常
- hibernate 实现多表连接查询(转载)
- C#计算器代码
- Object.create()兼容实现方法
- c高级编程4 LD_DEBUG
- Struts2的零配置和rest插件
- SQL2008-备份SQL数据库的语句
- SGU 138.Games of Chess
- struts2注解驱动 零配置
- 妙味课堂:JavaScript初级--第11课:字符串、查找高亮显示
- SAP BAPI创建批次 为保存内部对象号
- 使用非直接缓冲区与直接缓冲区进行文件的复制(基于Channel)
- 网站升级HTTPS后WebSocket不能连接的问题
- Fiddler--Filters
- None.js 第四步 事件驱动程序
- 浅谈meta viewport设置移动端自适应
- 一个很好用的SqlHelper类
- Kafka 协议实现中的内存优化【转】
- pyspark dataframe 格式数据输入 做逻辑回归
热门文章
- Go 验证是否字符串包含中文
- python 删除文件
- hdu1066 Last non-zero Digit in N!(求阶乘最后一位不为0的数字)
- 吴裕雄--天生自然ShellX学习笔记:Shell echo命令
- PAT Advanced 1038 Recover the Smallest Number (30) [贪⼼算法]
- LeetCode No.160,161,162
- 如何选择开源项目的license
- [HNOI2019]鱼(计算几何)
- 史上最强maven配置详情
- 定时任务--Timer()实现