Apache2不想启动

时间:2018-08-06 17:50:09

标签: ubuntu apache2

当我这样做时,我想在digitalocean的我的Droplet实例上运行apache2:

sudo systemctl -l status apache2

这使我回到

● apache2.service - The Apache HTTP Server
  Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor 
  preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
       └─apache2-systemd.conf

活动:自星期一2018-08-06 17:47:06 UTC以来失败(结果:退出代码); 5秒前   进程:14601 ExecStart = / usr / sbin / apachectl启动(代码=已退出,状态= 1 /失败)

Aug 06 17:47:06 kmplus systemd[1]: Starting The Apache HTTP Server...
Aug 06 17:47:06 kmplus apachectl[14601]: (98)Address already in use: 
AH00072: make_sock: could not bind to
Aug 06 17:47:06 kmplus apachectl[14601]: (98)Address already in use: 
AH00072: make_sock: could not bind to
Aug 06 17:47:06 kmplus apachectl[14601]: no listening sockets available, 
shutting down
Aug 06 17:47:06 kmplus apachectl[14601]: AH00015: Unable to open logs
Aug 06 17:47:06 kmplus apachectl[14601]: Action 'start' failed.
Aug 06 17:47:06 kmplus apachectl[14601]: The Apache error log may have 
more information.
Aug 06 17:47:06 kmplus systemd[1]: apache2.service: Control process 
exited, code=exited status=1
Aug 06 17:47:06 kmplus systemd[1]: apache2.service: Failed with result 
'exit-code'.
Aug 06 17:47:06 kmplus systemd[1]: Failed to start The Apache HTTP Server.

我的目的是安装mysql和phpmyadmin,但是apache2拒绝启动,我被阻止了。

有人可以帮我吗?

谢谢。

1 个答案:

答案 0 :(得分:0)

选项1:看来有两个用于端口80或端口443的Listen指令。编辑apache2的配置文件,并更正重复的Listen指令。

配置文件:vim /etc/apache2/ports.conf

选项2:执行以下命令:

ss -plnt sport eq:80

然后杀死令人讨厌的进程。

此外,您还可以从日志文件中查看apache2的日志,以进行进一步调查。