php - 如何从 PHP-FPM 获取此 NGINX 203 错误的其余部分
问题描述
我不断从 NGINX 收到 203 错误,并且可以使用一些帮助来解决它。当我访问http://localhost、http://localhost/index ... 等时出现此错误。该站点运行良好。
[error] 60#60: *203 FastCGI sent in stderr: "PHP message:" while reading response header from upstream, client: ::1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "localhost"
2019/10/25 13:34:35 [error] 60#60: *203 FastCGI sent in stderr: "PHP message:" while reading response header from upstream, client: ::1, server: _, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "localhost", referrer: "http://localhost/"
会议:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /mnt/c/Users/me/src/site;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# Make sure unix socket path matches PHP-FPM configured path above
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
# Prevent ERR_INCOMPLETE_CHUNKED_ENCODING when browser hangs on response
fastcgi_buffering off;
}
}
我假设它可能与此有关: Strange Nginx behavior with trailing slashes。但我并不完全明白。
解决方案
HTTP 代理位于客户端和服务器(源)之间。在某些情况下,HTTP 代理可能会在响应到达客户端之前对其进行更改。
所以,你真的很确定你得到的 203 错误来自你的 nginx 服务器吗?
推荐阅读
- azure - 使用负载均衡器的天蓝色会话管理
- javascript - 用于发布包含 HTML 输入数组的表单数据的 JavaScript 函数
- windows - Lua io.popen() - 在 Windows 上访问共享驱动器
- lua - 尝试使用 Position 索引 nil
- r - 如何在闪亮的modalDialog中呈现不同的表格
- reactjs - Redux 调度 index.html 的内容
- python - Python:设置递归限制减慢排序程序
- mne-python - python mne 原始对象是否代表一条线索?如果是这样,如何在多次试验中取平均值?
- regex - (regex,sed) 擦除单词后如何附加擦除的单词
- winapi - 是否有保留的线程 ID 值?