在 Ubuntu 上重启 Apache2 常用以下几种方式(任选其一):
sudo systemctl restart apache2
sudo service apache2 restart
sudo apache2ctl restart
sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl reload apache2
sudo systemctl status apache2
如果你是在 容器(Docker) 或 WSL 里用,也可以告诉我,情况会略有不同。