禁用后模块状态保持运行

Module status keeps running after it has been disabled

我重新启动了我的 linux 机器,并开始在我的 Apache 访问日志中注意到这些奇怪的请求。

::1 - - [16/Dec/2020:21:28:54 -0500] "GET /server-status?auto HTTP/1.1" 404 147 "-" "Go-http-client/1.1"
::1 - - [16/Dec/2020:21:29:07 -0500] "GET /server-status?auto HTTP/1.1" 404 147 "-" "Go-http-client/1.1"
::1 - - [16/Dec/2020:21:29:20 -0500] "GET /server-status?auto HTTP/1.1" 404 147 "-" "Go-http-client/1.1"
::1 - - [16/Dec/2020:21:29:26 -0500] "GET /server-status?auto HTTP/1.1" 404 147 "-" "Go-http-client/1.1"
::1 - - [16/Dec/2020:21:29:42 -0500] "GET /server-status?auto HTTP/1.1" 404 147 "-" "Go-http-client/1.1"
::1 - - [16/Dec/2020:21:29:58 -0500] "GET /server-status?auto HTTP/1.1" 404 147 "-" "Go-http-client/1.1"

我研究了如何禁用这些请求,发现它们是名为“状态”的 Apache 模块的一部分。我禁用了它,当我 运行 a2dismod status 它似乎被禁用时:

Module status already disabled

除了阻止它们之外,我怎样才能让这些请求停止?我不想让我的访问日志充满垃圾。

您可以使用 SetEnvIf:

SetEnvIf Request_URI "^/server-status?auto$" dontlog

这里有更多详细信息: https://www.howtoforge.com/setenvif_apache2

或者您可以找出您有请求的原因并将其停用。也许是监控系统?