httpd 服務無法重啟 ,網上查到的資料都是端口號沖突 ,記錄一下自己的解決辦法 !!!
首先查看 服務狀態 : service status httpd / systemctl status httpd.service 提示啟動失敗
再次停止服務 : service stop httpd / systemctl stop httpd、
啟動服務: service start httpd / systemctl start httpd
提示 Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
輸入 : journalctl -xe
並沒有被發現 端口占用 ,去 etc/httpd/logs 查看日志
發現報錯 :
No such file or directory: AH01597: could not open mime types config file /etc/httpd/conf/mime.types. AH00016: Configuration Failed
解決辦法 :
把文件復制到/etc/httpd/conf/mime.types.
cp /etc/mime.types /etc/httpd/conf/
cd /etc/httpd/conf/
ls
發現有mime.types. 文件
再次啟動httpd,沒有問題,可以啟動了!
systemctl start httpd.service
ok 拉 。。