haproxy根据客户端浏览器进行跳转
2015-08-27 23:14
489 查看
根据手机端 acl iphone hdr_sub(user-agent) -i iphone redirect prefix if iphone acl android hdr_sub(user-agent) -i android redirect prefix if android 根据访问后缀 acl test_pic path_end .gif .png .jpg .css .js use_backend nginxpools if test_pic 根据访问开始路径来匹配 acl test_static path_beg /html/ acl hd_dom hdr(Host) -i test.com -i 忽略大小写 hdr是函数 method http方法 req_ver 请求版本 resp_ver 响应版本 status http状态 url 精确匹配url url_reg 正则匹配 url_dir 斜线之间 url_dom 斜线之间或点之间 在haproxy匹配的时候根据use_backend先后顺序进行匹配 Haproxy健康检查方式 1.基于端口的健康检查方式 check port 80 2.基于http的head的ip url健康检查方式 option httpchk HEEAD /health.txt HTTP/1.0 server web1 192.168.1.2:80 maxconn 20480 weight 8 check inter 3000 fall 2 rise2 3.基于http的get的健康检查方式 option httpchk GET /health.txt 4.基于具体业务域名的URL健康检查 option httpchk HEAD /index.jsp HTTP/1.1\r\nHost: option httpchk GET /index.jsp HTTP/1.1\r\nHost:www.test.com haproxy中backup参数的使用
本文出自 “枫林晚” 博客,请务必保留此出处http://fengwan.blog.51cto.com/508652/1689112
相关文章推荐
- Java基础の第一弹
- UIViewController
- 一些简单排序算法的下界
- 安装minGW编译器及其使用方法
- springMVC上传文件
- CF 500D New Year Santa Network tree 期望 好题
- [MFC] MDI框架下 vs2010 动态添加菜单
- Android OnTouchListener触屏事件接口
- 单体测试详解
- OnTouchListener触摸事件
- UVa 1623:Enter the Dragon(贪心)
- String
- 认识GIT
- Oracle OCP笔记(28)RMAN备份 - Catalog
- hdu 3388 Coprime 容斥原理 二分查找
- 大牛isap模板
- 四大天王之内容提供者ContentProvider
- 1 时间序列基本概念
- 了不起的巴尔坦星人
- 字符及文本处理之二:grep及正则表达式详解