关于haproxy hdr_reg(host) 的一些解释

58 篇文章 34 订阅 ¥39.90 ¥99.00
本文探讨了HAProxy配置中的`acl`和`hdr_reg(host)`用法,解释了如何通过`hdr_reg(host) -i <domain>`判断HTTP请求头中的Host字段是否以指定域名开头,并在满足条件时触发特定的后端服务选择。通过对`cdn_name`ACL的定义,文章帮助读者理解HAProxy如何进行不区分大小写的主机名匹配及其在实际配置中的应用。
摘要由CSDN通过智能技术生成
I've recently taken over an environment using HAProxy, and I'm attempting to learn the config and what it all means, but I'm 

finding some aspects of it are not clear. 

我最近在用Haproxy,我尝试学习配置,但是我发现有些方面不是很清楚
What does “acl cdn_name hdr_beg(host) -i foor.bar.com” mean in HAProxy's configuration?


     acl zjtest7_com   hdr_reg(host)  -i zjtest7.com
      use_backend zjtest7_com  if  zjtest7_com 
      


I think the above means that if host header begins with "foo.bar.com" then use the cdn cdn_name, but I'm not totally sure. Can 

somebody confirm for me 

我认为如果主机请求头是以"foo.bar.com" 开始 那么使用 cdn_name 


It's defining an ACL with the name cdn_name, with the criteria hdr_beg(host) -i foo.bar.com. The criteria basically mea
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

scan724

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值