以下是在Ubuntu上配置Apache监控的几种方法:
sudo a2enmod status
。/etc/apache2/mods-enabled/status.conf
,设置Require ip
指令,如Require ip 127.0.0.1
,仅允许本地访问。sudo systemctl restart apache2
。http://服务器IP/server-status
。sudo apt-get install apachetop
,运行sudo apachetop -f http://localhost/server-status?auto
查看实时状态。htop
后运行htop
,可查看Apache进程的资源使用情况。