Nginx 错误信息
497 HTTP to HTTPS497 HTTP to HTTPS — Nginx 向 HTTPS 端口发送了 HTTP 请求
向 HTTPS 端口发送了明文 HTTP 请求。
nginxserver
导致此错误的原因
客户端在未使用 TLS 的情况下连接到 HTTPS 端口(通常为 443)。Nginx 在 SSL 监听器上检测到了未加密的请求。
如何修复
配置从 HTTP 到 HTTPS 的重定向。在 server 块中添加 error_page 497 =301 https://$host$request_uri;。
相关错误代码
Nginx 错误错误
496 SSL Certificate Required496 SSL Certificate Required — Nginx 需要 SSL 证书
服务器要求客户端证书,但客户端未提供。
nginxserver
查看详情 Nginx 错误错误
upstream timed outupstream timed out — 上游响应超时
Nginx 等待上游服务器响应时超时。
nginxserver
查看详情 Nginx 错误错误
494 Request Header Too Large494 Request Header Too Large — Nginx 请求头过大
请求头超过了 Nginx 的最大头部缓冲区大小。
nginxserver
查看详情 Nginx 错误错误
414 URI Too Long414 URI Too Long — Nginx URI 过长
请求 URI 超过了 Nginx 可处理的最大长度。
nginxserver
查看详情 Nginx 错误警告
408 Request Timeout408 Request Timeout — Nginx 请求超时
客户端未在超时时间内发送完整请求。
nginxserver
查看详情 Nginx 错误错误
recv() failed (104: Connection reset by peer)recv() failed (104: Connection reset by peer) — 连接被重置
客户端在数据传输过程中重置了连接。
nginxserver
查看详情