在 Ubuntu 上重启 Apache2 常用以下几种方式(需要有一定权限,一般加 sudo):
sudo systemctl restart apache2
sudo service apache2 restart
sudo /etc/init.d/apache2 restart
sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl reload apache2
sudo systemctl status apache2
如果你遇到重启报错,可以把错误信息贴出来,我帮你分析。