要在Ubuntu上停止Apache2服务器,请打开终端并运行以下命令:
sudo systemctl stop apache2
这将立即停止Apache2服务。如果你想禁止Apache2在系统启动时自动运行,可以使用以下命令:
sudo systemctl disable apache2
如果你想重新启动Apache2服务,可以使用以下命令:
sudo systemctl restart apache2
如果你想查看Apache2服务的状态,可以使用以下命令:
sudo systemctl status apache2