Home > Backend Development > PHP Tutorial > nginx proxy has data truncation problem nginx apache nginx php nginx rewrite

nginx proxy has data truncation problem nginx apache nginx php nginx rewrite

WBOY
Release: 2016-07-29 08:53:45
Original
3168 people have browsed it

The nginx reverse proxy (Reverse Proxy) method uses a proxy server to accept connection requests on the Internet, then forwards the request to the server on the internal network, and returns the results obtained from the server to the client requesting a connection on the Internet. , at this time the proxy server appears as a reverse proxy server to the outside world.
When the returned data is too large, the data may be truncated. The specific reasons and solutions are:
1 Directly accessing server B, normal
2 Accessing non-PHP content, normal
3 Turning off compression does not solve the problem, and has nothing to do with compression.
Later, I checked two articles and solved the problem. It was an issue with the read and write permissions of the fastcgi_temp directory. Symptoms: A large number of errors similar to the following appear in the Nginx error log:
2013/08/25 00:41:28 [crit] 32763#0: *5439 open() "/Data/apps/nginx/fastcgi_temp/5/02 /0000000025" failed (13: Permission denied) whil
e reading upstream, client: 203.171.237.2, server: www.aslibra.com, request: "GET /thread.html HTTP/1.0", upstream: "f
astcgi: //127.0.0.1:9000", host: "www.aslibra.com", referrer: "http://www.aslibra.com/f.html"
Refer to the solution in the article:
Judging from this sentence it is possible The generated file is too large and needs to be stored in the form of a file, and nginx does not have permission to read it. So chmod -R 764 /usr/local/nginx/fastcgi_temp/ solved the problem.

The above introduces the problem of data truncation in nginx proxy, including nginx content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template