为什么Apache无法重启? “手工审查情况”
ubuntu@fast:~$ /etc/init.d/apache2 restart * Restarting web server apache2 [fail] * There are processes named 'apache2' running which do not match your pid file which are left untouched in the name of safety, Please review the situation by hand.
到底是怎么回事?
cat /var/run/apache2.pid 1342 pidof apache2 1723 1468 1467 1466 1440 1439 1438 1433 1348 1347 1342
通过执行以下命令检查Apache2的pid:
pidof apache2
然后杀死显示的pid执行:
sudo kill -9
重启Apache2。
检查/etc/apache2/apache2.conf
设置的pid文件路径是否等于/etc/apache2/envvars
导出的APACHE_PID_FILE
变量。
我知道回答这个问题为时已晚,但未来可能对某人有所帮助。
- 执行:
pidof apache2
- 然后,
sudo kill -9 pid
- 执行上述命令杀死所有pid
- 启动apache:
sudo service apache2 start
完成。