配置nginx服务器从一台服务器如果获取不到图片 从另外一台服务器中获取
location ^~ /uploads/ {
root /data/weiwend/weiwang;
try_files $uri @new_uploads;
} location @new_uploads {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://172.17.0.101:80;
} 在负载均衡的容器里配置,try_files 失败转到另外一台容器