关于主机部分www的问题:
case 1:
frontend web_service
bind *:80
bind *:443 ssl crt /etc/haproxy/cert.pem
acl wwwpod100_com hdr_beg(host) -i zjtest7.com
use_backend wwwpod100_com if wwwpod100_com
backend wwwpod100_com
mode http
server apphost_1 192.168.32.101:3000 check inter 2000 fall 3
mojo 接口:
get '/scan/test' => sub {
my $c = shift;
$c->render(text => "welcome wxpod999" );
};
zjtest7-haproxy:/etc/haproxy# curl http://zjtest7.com/scan/test
welcome wxpod999zjtest7-haproxy:/etc/haproxy#
zjtest7-haproxy:/etc/haproxy#
zjtest7-haproxy:/etc/haproxy# curl zjtest7.com/scan/test
welcome wxpod999zjtest7-haproxy:/etc/haproxy#
加上www呢?
zjtest7-haproxy:/etc/haproxy# curl www.zjtest7.com/scan/test
<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>
此时请求不到
c
主机头部分 www有和无是有区别的
最新推荐文章于 2024-02-05 16:00:56 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)