Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
When using hue, it’s a bit slow to load CSS and other files, so we plan to use nginx to load local static files directly to achieve the purpose of acceleration. However, some pages can not be loaded, and the error net:: err will be reported_ CONTENT_ LENGTH_ MISMATCH。
In chrome, please cache or force refresh. The status code of response is 200
The status code of response is 206
In response header, the length of content length is consistent with the actual length of the target file
The above content length mismatch error will appear
If you do not access Tomcat directly through nginx, the system functions normally without this error
Solution:
After checking the error.log log of nginx, it is found that:
2016/08/25 09:59:52 [crit] 24677#0: *1 open() “/var/lib/nginx/tmp/proxy/1/00/0000000001” failed (13: Permission denied) while reading upstream, client: 182.148.107.206, server: 114.55.4.111, request: “GET /notebook/new HTTP/1.1″, upstream: ” http://114.55.4.111 :10081/notebook/new”,
It turns out that there is no permission. By default, nginx uses the directory created by the nginx user. I use the hue user here, so I have to give the permissions of the folder under nginx to hue
sudo chmod -R 775 /var/lib/nginx/
sudo chown -R hue /var/lib/nginx/
Restart nginx and solve the problem
Similar Posts:
- AccessBlank Page: js File Error: failed(ERR_CONTENT_LENGTH_MISMATCH)
- Nginx normal user startup configuration error: && springboot-swagger & Unable to infer base url
- [Solved] Nginx reverse proxy 502 permission denied
- Nginx an upstream response is buffered to a temporary file,nginx502 Error
- Fix Nginx 502 Error:upstream sent too big header while reading response header from upstream
- How to Solve Chrome Error: “net::ERR_INCOMPLETE_CHUNKED_ENCODING”
- [Sovled] CentOS nginx 500 error: failed (13: Permission denied)
- Nginx Timeout Error: upstream timed out (110: Connection timed out) while reading response header from ups…
- [Solved] Nginx proxy Timeout: upstream timed out (110: Connection timed out)
- [Solved] Nginx 502Bad Gateway: some static resources cannot be accessed