简体   繁体   English

禁用 apache 服务器状态检查

[英]Disable apache server-status check

In apache access.log following lines are coming and as a result my response time metric is getting affected.How can i disable/remove these lines from access.log?在 apache access.log 中,将出现以下几行,因此我的响应时间指标受到影响。如何从 access.log 中禁用/删除这些行?

127.0.0.1 - - [10/Aug/2017:08:38:22 +0000] "localhost.****.com" "GET /server-status?auto HTTP/1.1" 200 300 291 "-" "Ruby" 127.0.0.1 - - [10/Aug/2017:08:38:22 +0000] "localhost.****.com" "GET /server-status?auto HTTP/1.1" 200 300 291 "-" "Ruby ”

This functionality comes from a standard module called status and so you can simply disable that module to remove the /server-status endpoint.此功能来自一个名为status标准模块,因此您可以简单地禁用该模块以删除/server-status端点。

On a Debian-based server, that means running:在基于 Debian 的服务器上,这意味着运行:

a2dismod status

and then restarting the web server:然后重新启动 Web 服务器:

apache2ctl configtest
systemctl restart apache2.service

Comment below lines in httpd.conf在 httpd.conf 中评论下面的行

#<Location /server-status>
#    SetHandler server-status
#    Order deny,allow
#    Deny from all
#    Allow from localhost 127.0.0.1
#</Location>

Also is check if any cronjob is running in server.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM