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