gpt4 book ai didi

apache - 客户端发送格式错误的主机 header

转载 作者:行者123 更新时间:2023-12-02 08:43:36 26 4
gpt4 key购买 nike

我不断在 Apache 的错误日志中收到此错误:

[client 127.0.0.1] Client sent malformed Host header

正好每 5 分钟一次。这是因为我们在服务器上安装了 Varnish,但我不明白为什么以及如何修复它。我什至尝试设置 Apache 的 error_log 详细程度进行调试,但没有提供其他有用的信息。有什么想法吗?

我们的 Varnish 配置非常基本:

backend default {
.host = "127.0.0.1";
.port = "9001";
}

sub vcl_recv {
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;
}

我们有几个在端口 9001 上运行的虚拟主机。

任何人都可以告诉我有关此错误的更多信息以及如何解决或至少调查它吗?

最佳答案

Varnish 执行 health check在您的后端,可能需要更精确地配置 Apache 才能接受它。如果这不能解决您的问题,请尝试在 Apache 中记录 User-Agent header ,以找出是谁发出了格式错误的请求。

关于apache - 客户端发送格式错误的主机 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13118635/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com