以下是在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進程的資源使用情況。