HAproxy配置指令简单总结之一
2016-11-28 15:13
218 查看
haproxy配置分为两部分
global
proxies
default
frontend
backend
listen = frontend + backend
global
proxies 需要注意使用的位置 backend、frontend、listen、default
ACL简单指令说明
criterion
flags
op
访问控制相关的参数
global
proxies
default
frontend
backend
listen = frontend + backend
global
进程管理及安全相关的参数 chroot pidfile user uid group gid log <address> <facility> daemon
性能调整相关的参数 maxconn noepoll nopoll
debug相关参数 debug
proxies 需要注意使用的位置 backend、frontend、listen、default
balance --> roundrobin static-rr leastconn source uri uri-param hdr(<name>) bind mode hash-type map-based --> 取模 用key的hash值对server总数取模, consistent --> 一致性hash 一致性hash算法除了计算key的hash值外,还会计算每个server对应的hash值, 然后将这些hash值映射到一个有限的值域上(比如0~2^32) log maxconn default_backend server <name> <address>[:prot] [param*] capture request header <name> len <length> capture response header stats enable stats uri stats realm stats auth stats hide-version stats admin option forwardfor [ header <name> ] [ if-none ] errorfile errorfile 400 /etc/haproxy/errorpages/400badreq.http errorfile 403 /etc/haproxy/errorpages/403forbid.http errorfile 503 /etc/haproxy/errorpages/503sorry.http timeout client <timeout>: timeout server <timeout> timeout connect <timeout> timeout http-keep-alive <timeout> timeout client-fin <timeout> timeout server-fin <timeout>
ACL简单指令说明
acl acl_name criterion flags op value
criterion
dst dst_port src src_port --> 4层 hdr <string> method <string> path_beg <string> path_end <string> hdr_beg <string> hdr_end <string> --> 7层
flags
-i
op
eq:等于 ge;大于等于 gt:大于 le:小于等于 lt:小于 =:等于
访问控制相关的参数
http-request { allow | deny} [ { if | unless } <condition> ] tcp-request content <action> [{if | unless} <condition>] <action> "accept", "reject",
相关文章推荐
- HAproxy配置指令简单总结之一
- Nginx配置文件指令简单总结之一
- MPICH2简单的安装配置总结
- 总结Dynamips下使用SDM及配置QOS的简单过程
- (总结)Linux服务器上最简单的Nginx反向代理配置
- (总结)Linux服务器上最简单的Nginx反向代理配置
- httpd2.4.10 配置文件简单指令说明
- 项目维护中的总结——简单的Apache+Tomcat多服务器配置
- haproxy简单配置说明
- XP IIS下配置.net的问题总结与简单解决方法
- liunx系统安装nginx,以及配置、用到的简单指令
- 学习ejb并配置一个简单的helloEjb是遇到问题后总结的经验。
- vss安装与配置简单总结
- Linux samba简单配置总结
- vss安装与配置简单总结
- 对haproxy配置学习过程中几个点进行总结
- linux系统服务总结之六:SQUID代理简单上网配置
- log4j logback slf4j项目配置中的简单总结
- linux各环境变量配置文件简单总结介绍
- nagios+centreon总结之第三章――nagios+centreon简单配置