[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] [pid 11281 ] AH01232: suEXEC m$ 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] [ lbmethod_heartbeat :notification] [pid 11281] AH022$ [Wed Feb 1, 2017 06:58:40.318077 2017] [mpm_prefork:notification] [pid 11281] AH00163: Apa$ [2017년 2월 Wed 2월 1일 06:58:40.318136] [ 핵심 :notice] [pid 11281] AH00094: 명령 li$ [Wed Feb 01 07:12:30.844891 2017] [mpm_prefork:notice] [pid 11281] AH00170: cau$