ERR_CONTENT_LENGTH_MISMATCH的解决方法
问题:前端控制台报错ERR_CONTENT_LENGTH_MISMATCH,nginx日志报错
2024/07/09 16:31:18 [crit] 1245383#1245383: *305 open() "/var/lib/nginx/tmp/proxy/5/03/0000000035" failed (13: Permission denied) while reading upstream, client: 192.168.10.1, server: consul.test.com, request: "GET /ui/assets/vendor-892a8787e7c054f43bebe02b1e5bc878.js HTTP/1.1", upstream: "http://192.168.10.134:8510/ui/assets/vendor-892a8787e7c054f43bebe02b1e5bc878.js", host: "consul.test.com", referrer: "http://consul.test.com/ui/"
解决:由于nginx启动的是www用户,而/var/lib/nginx/tmp/是root导致没有权限
[root@nginx-proxy 16:33:05/etc/nginx]# chown www.www -R /var/lib/nginx -R