在 CentOS 系统中,您可以使用以下命令来重启 Apache 服务:
sudo systemctl restart httpd
或者
sudo systemctl restart apache2
sudo service httpd restart
或者
sudo service apache2 restart
sudo /etc/init.d/httpd restart
或者
sudo /etc/init.d/apache2 restart
重启 Apache 服务后,您可以通过访问服务器的 IP 地址或域名来检查服务是否正常运行。如果看到 Apache 的默认页面,说明服务已成功重启。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
相关推荐:centos apache更新后如何重启