記服務器 httpd 服務無法啟動


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 拉 。。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM