问题描述
当我从我的 drupal 网站搜索链接时 https://example.com/index2.php?option=com_ckforms&view=ckforms&id=1&Itemid=190我收到 502(坏网关)响应并重定向到 502 nginx 错误页面而不是 404,因为 5xx 错误是为实际服务错误保留的.
When I am searching for a link from my drupal website https://example.com/index2.php?option=com_ckforms&view=ckforms&id=1&Itemid=190i am getting 502(bad gateway) response and redirecting to 502 nginx error page instead of 404 as 5xx errors are reserved for actual service errors.
我在日志中收到上游发送不支持的 FastCGI 协议版本:从上游读取响应标头时为 72"错误.
I am getting "upstream sent unsupported FastCGI protocol version: 72 while reading response header from upstream" error in logs.
我发现原因可能是 - 此服务器(Web 前端)从它访问以满足请求的上游(Web 后端)服务器接收到无效响应.在大多数情况下,这并不意味着上游服务器已关闭,而是上游服务器和网关/代理在交换数据的协议上不一致.该问题最常见的原因是 Web 前端和后端之间的 IP 通信出现问题.在尝试解决此问题之前,您应该彻底清除浏览器缓存.
I found that the reason could be- This server (Web Front-End) received an invalid response from an upstream (Web Back-End) server it accessed to fulfil the request.In most cases this will not mean that the upstream server is down, but rather that the upstream server and the gateway/proxy do not agree on the protocol for exchanging data.The problem is most commonly caused when there is a problem with IP communications between the Web Front and Back-Ends. Before you attempt to resolve this problem you should clear your browser cache completely.
谁能推荐一下
提前致谢!
推荐答案
我加了
try_files $uri =404;
try_files $uri =404;
在 nginx 配置文件中的位置设置.这解决了我的问题.
in nginx configuration file at location settings. This resolved my issue.
这篇关于Drupal 页面返回 502 错误页面而不是 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!