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

「vi /etc/httpd/conf/httpd.conf」
でhttpd.confファイルを編集後に保存し、その後、Apacheの再起動をかけてみたらエラーが出ました。

 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」でどこが間違っているかを調べることができます。

 service httpd configtest
AH00526: Syntax error on line 145 of /etc/httpd/conf/httpd.conf:
Illegal option FollowSymLinks\xe3\x80\x80

これで Option FollowSymLinks が間違っていることがわかりました。 145行目と、行数も教えてくれるので便利です。



Author: webmaster