一、查看服務狀態
#systemctl status httpd
(1)配置文件出錯
能夠看到:Syntax error on line 364 of /etc/httpd/conf/httpd.conf:(/etc/httpd/conf/httpd.conf的第364行出現語法錯誤:)
Invalid command 'adModule', perhaps misspelled or defined by a module not included in the server configuration(命令「admodule」無效,可能拼寫錯誤或由服務器配置中未包含的模塊定義)
打開配置文件,修改語法錯誤便可。服務器
啓動httpd服務
#service httpd start
故障已經排除ide
(2)端口號被佔用或者被修改
查看端口號是否被佔用
#netstat -antlp | grep 80
提供兩種思路,殺死佔用進程或者更換httpd的端口號。這裏再也不贅述。3d
(3)防火牆阻擋 建議直接關閉防火牆 #service iptables stop
或者開放端口
#firewall-cmd --add-service=httpcode