[Apache] エラー対処方法 Job for httpd.service failed because the control process exited with error code

「vi /etc/httpd/conf/httpd.conf」
でhttpd.confファイルを編集後に保存し、その後、Apacheの再起動をかけてみたらエラーが出ました。
1 2 |
systemctl restart httpd.service Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details. |
これだけだと何が間違っているかわかりません。
「service httpd configtest」でどこが間違っているかを調べることができます。
1 2 3 |
service httpd configtest AH00526: Syntax error on line 145 of /etc/httpd/conf/httpd.conf: Illegal option FollowSymLinks\xe3\x80\x80 |
これで Option FollowSymLinks が間違っていることがわかりました。 145行目と、行数も教えてくれるので便利です。
関連記事
- [Linux] CentOSでApacheをインストールする方法
- [Linux] CentOSでサービスの起動・停止・状態の確認を行う方法
- [Linux] Apache(httpd.conf)の設定
- [CentOS] 特定のサービスの起動を確認・自動起動設定
- [CentOS 7x] Firewalldが動かない