In the afternoon when the site on AWS EC2 is inaccessible, and the IP is accessible, login to SSH and view the service
Service--status-all
Discover that the HTTPD service is stopped, and then try to start httpd, prompt:
Starting httpd: () Permission denied:AH00058:Error retrieving PID file/var/run/httpd/httpd.pidah00059:remove it befor e Continuing if it is corrupted.
Google found an article:
Http://serverfault.com/questions/544879/service-httpd-restart-failure-on-aws-amazon-linux-ami
Follow the answers and finally solve
To be said, to use the root account in EC2, the command is:
sudo su
Slightly different from the answer, I try to
Su-root
Failed
And then the KILL command did not succeed,
Used a
For i in ' Lsof-i: 80 | grep http | awk {' Print $ '} '; Do kill-9 $i; Done
After that, start httpd again, and it succeeds.
HTTPD corrupted HTTPD Service stopped