location ~ /upload/(.+)\!t(.+) {
root /home/data/static/sjzj;
expires 7d;
access_log off;
image on;
image_output on;
#文件不存在,则访问 负载均衡
#rewrite ^/(.*)\!(.*)$ /$1 break;
#try_files /upload/$1 /upload/$1!t$2;
if (!-e $document_root/upload/$1) {
proxy_pass https://www.******.com;
}
}
nginx判断 要访问 的文件是否存在
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.