nginx反向代理 報錯#3848: *1621 CreateFile() "

#3848: *1621 CreateFile() "D:\nginx-1.8.0/html/resources/moneyProject/img/asdfgv.png" failed (3: The system cannot find the path specified), client:

大多是緩存問題
location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 30d;
}

     這個意思是保留在客戶端瀏覽器緩存的靜態圖片文件30天,nginx做反向代理的時候 ,真正的服務器在後端,而緩存指向在了nginx的html 文件夾下,查看nginx的錯誤日誌:[error] 3824#3848: *1621 CreateFile() "D:\nginx-1.8.0/html/resources/moneyProject/img/asdfgv.png" failed (3: The system cannot find the path specified), client: 58.250.95.186, server: localhost, request: "GET /resources/moneyProject/img/asdfgv.png HTTP/1.1", host: 
     nginx的目錄下的html文件夾無法找到此圖片
     處理方法 刪除
     location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
          expires  30d;
     } 
     重新加載nginx 問題得到解決
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章