<pre name="code" class="html">/***第一种
nginx 配置:
location / {
root /var/www/zjzc-web-frontEnd;
index index.html;
}
zjtest7-frontend:/var/www/zjzc-web-frontEnd/images# pwd
/var/www/zjzc-web-frontEnd/images
zjtest7-frontend:/var/www/zjzc-web-frontEnd/images# ls
3.png
http://192.168.32.76:8001/images/3.png
haproxy:
acl image_req path_beg -i /images
use_backend imageserver_8001 if image_req
backend imageserver_8001
mode http
balance roundrobin
server webhost01_8001 192.168.32.76:8001 check inter 2000 fall 3 weight 20
haproxy 如果有这行就不行
#acl url_static_zjdev path_end .html .gif .png .jpg .css .js 注释掉这行
/*******************
frontend we
haproxy image跳转 haproxy匹配 匹配到了就停止,不会继续往下匹配
最新推荐文章于 2022-05-02 17:23:22 发布