image.xx.com 通过haproxy 跳转到内部图片服务器

时间:2021-10-08 13:56:34
<pre name="code" class="html">http://www.hyyche.com/#main

C:\Users\Administrator>ping hyyche.com

正在 Ping hyyche.com [114.55.185.26] 具有 32 字节的数据:
来自 114.55.185.26 的回复: 字节=32 时间=7ms TTL=45 114.55.185.26 的 Ping 统计信息:
数据包: 已发送 = 1,已接收 = 1,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 7ms,最长 = 7ms,平均 = 7ms
Control-C
^C
C:\Users\Administrator>ping image.hyyche.com
Ping 请求找不到主机 image.hyyche.com。请检查该名称,然后重试。 haproxy 配置; # redirect scheme https if !{ ssl_fc }
acl host_static hdr_beg(host) -i image. video. down
use_backend webserver_test if host_static http://image.hyyche.com//images//webbanner/20151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110 此时不行:
[root@hy-haproxy ~]# wget http://image.hyyche.com//images//webbanner/20151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110
--2016-08-08 19:09:36-- http://image.hyyche.com//images//webbanner/20151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110
Resolving image.hyyche.com... failed: Name or service not known.
wget: unable to resolve host address ?.mage.hyyche.com? [root@hy-haproxy ~]# wget http://image.hyyche.com//images//webbanner/20151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110
--2016-08-08 19:21:14-- http://image.hyyche.com//images//webbanner/20151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110
Resolving image.hyyche.com... 114.55.185.26
Connecting to image.hyyche.com|114.55.185.26|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 911926 (891K) [image/jpeg]
Saving to: ?.0151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110.1? 100%[================================================================================================================================================================>] 911,926 1.16M/s in 0.7s 2016-08-08 19:21:15 (1.16 MB/s) - ?.0151228101039b79c3f60f74c4d68be1ea0b9c668f532.jpg?version=1470484416110.1?.saved [911926/911926] hyyche.com和image.hyyche.com指向同一个地址