nginx判斷 要訪問 的文件是否存在

 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; 
            }
        }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章