Apache: 页面出现 404 Client Error: Not Found
故障说明
安装 Apache,NGINX,PHP-FPM 等组件监控时,配置完 yaml 文件后,重启探针报出以下错误:

故障原因
Ci 探针中这 3 个服务的配置文件默认使用特定的监控模块:
apache.yaml使用serverstatus模块nginx.yaml使用nginx_status模块php_fpm.yaml需要开启status状态页
所以配置这几项服务监控时需要进行额外配置。
Apache

NGINX

PHP-FPM

解决方法
请根据您的环境进行配置
Apache
修改 Apache 的配置文件 httpd.conf,进入以下位置进行配置:
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
NGINX
修改 NGINX 的配置文件 /etc/nginx/site-available/default,进入以下位置进行配置:
server {
location /nginx_status {
stub_status on;
}
}
PHP_FPM
修改 php-fpm 配置文件 php-fpm.conf
pm.status_path = /status
修改 NGINX 的配置文件:NGINX 配置的 PHP-FPM
server {
location /status {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}