Amazon EC2 - Apache server restart issue

前端 未结 4 691
故里飘歌
故里飘歌 2021-02-04 09:41

When i run this command

sudo /etc/init.d/httpd restart

it gives below error

Stopping httpd: [FAILED]

4条回答
  •  野性不改
    2021-02-04 10:33

    I have had this issue very rarely over the last couple years with a server I've been managing. Unfortunately, if you are getting FAILED after trying to restart, the process that's managing the connection on port 80 won't release it's hold on that port.

    I would try a full "sudo /etc/init.d/httpd stop" wait for that to finish or fail.

    If that doesn't fix it you'll have to restart the server completely. Hopefully, it's configured to start everything up automatically on restart, but that isn't guaranteed.

    "apachectl" is also great tool for Apache, but it may not be on this server, it depends on the install and linux distro used.

    If after rebooting the server, apache still fails to start, something bad has happened. I'd consider pulling all the website and conf files for creating a new server at that point, but the apache start, and then failed message output should give you some idea of where to look in the Logs about why it cannot start.

提交回复
热议问题