ngixn反向代理报错解决

今天在写七牛图床管理时,使用nginx反向代理,加载文件报错Net::ERR_INCOMPLETE_CHUNKED_ENCODING

查看nginx日志文件/usr/local/var/log/nginx/error.log发现下面这行:

1
2018/03/16 15:22:21 [crit] 77033#0: *3361 open() "/usr/local/var/run/nginx/proxy_temp/7/12/0000000127" failed (13: Permission denied) while reading upstream, client: 127.0.0.1, server: dev.jakeyu.top, request: "GET /app.js HTTP/1.1", upstream: "http://127.0.0.1:8081/app.js", host: "dev.jakeyu.top:8080", referrer: "http://dev.jakeyu.top:8080/"

于是切换到proxy_temp所在目录,修改目录用户:

1
chown -R jake ./proxy-temp

完美解决