Apacheを起動できません

Apacheを起動できません
[root@localhost ~]# systemctl start 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.
[root@localhost ~]#  systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Wed 2017-02-01 14:41:03 EST; 8s ago
    Docs: man:httpd(8)
          man:apachectl(8)
  Process: 3099 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 3098 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
  Main PID: 3098 (code=exited, status=1/FAILURE)

Feb 01 14:41:03 localhost.localdomain systemd[1]: Starting The Apache HTTP Se...
Feb 01 14:41:03 localhost.localdomain httpd[3098]: AH00526: Syntax error on l...
Feb 01 14:41:03 localhost.localdomain httpd[3098]: Invalid command 'Comment',...
Feb 01 14:41:03 localhost.localdomain systemd[1]: httpd.service: main process...
Feb 01 14:41:03 localhost.localdomain kill[3099]: kill: cannot find process ""
Feb 01 14:41:03 localhost.localdomain systemd[1]: httpd.service: control proc...
Feb 01 14:41:03 localhost.localdomain systemd[1]: Failed to start The Apache ...
Feb 01 14:41:03 localhost.localdomain systemd[1]: Unit httpd.service entered ...
Feb 01 14:41:03 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

答え1

問題はApache設定ファイルの構文エラーのようです。エラーログを確認してください(一般的な内容/var/log/httpd/error_logまたは/var/log/apache2/error_log詳細については)。エラーを修正すると、Apacheサーバーが起動する可能性があります。

答え2

以下を使用して構成ファイルの構文を確認できます。

apachectl configtest

~からhttps://httpd.apache.org/docs/2.4/programs/apachectl.html:

configtest
Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or detailed information about the particular syntax error. This is equivalent to apachectl -t.

答え3

[Wed Feb 1 2017 06:58:40.131743 2017] [core:notice] [pid 11281] SELinux ポリシー enab$ [Wed Feb 1 06:58:40.133098 2017] [suexec:notice]1$2 AH00558: httpd: サーバーの完全修飾 domai$ を確実に決定できません。 [Wed Feb 01 06:58:40.165629 2017] [auth_digest:notice] [pid 11281] AH01757: gen$ [Wed Feb 01 06 :58:40.167758 2017] [ lbmet2 $[Wed Feb 1 , 2017 06:58:40.318077 2017] [mpm_prefork:notification] [pid 11281] AH00163: Apa$ [2017年2月 Wed 2月1日 06:58:40.318131] 0 コアli$ [Wed Feb 01 07:12:30.844891 2017] [mpm_prefork:notice] [pid 11281] AH00170: cau$

関連情報