在 Ubuntu 上重启 Apache2 通常使用 systemctl 命令(适用于 Ubuntu 16.04 及以后版本):
sudo systemctl restart apache2
sudo systemctl reload apache2
sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl status apache2
sudo service apache2 restart
如果你遇到权限或端口冲突问题,也可以告诉我具体报错信息。