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 问题得到解决