在 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
如果你用的是很老的 Ubuntu,也可以用:
sudo service apache2 restart
如果你是要修改配置后生效,一般 reload 就够了;如果是模块变更或不确定,就用 restart。
需要我帮你排查 Apache 启动失败或配置问题也可以说。