[Redhat(centos)] systmectl start[restart] httpd 에러[error]

2020. 4. 17. 14:22보안 꿀팁

[root@linux200 ~]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

http 기동 중 error 발생 

[root@linux200 ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2020-04-17 12:19:15 KST; 1min 25s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 2587 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 2585 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 2585 (code=exited, status=1/FAILURE)

Apr 17 12:19:15 linux200.example.com systemd[1]: Starting The Apache HTTP Server...
Apr 17 12:19:15 linux200.example.com httpd[2585]: AH00526: Syntax error on line 8 of /etc/httpd/conf.d/mod_security.conf:
Apr 17 12:19:15 linux200.example.com httpd[2585]: Invalid command 'SecRuleEngline', perhaps misspelled or defined by a module not included in the server configuration
Apr 17 12:19:15 linux200.example.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 17 12:19:15 linux200.example.com kill[2587]: kill: cannot find process ""
Apr 17 12:19:15 linux200.example.com systemd[1]: httpd.service: control process exited, code=exited status=1
Apr 17 12:19:15 linux200.example.com systemd[1]: Failed to start The Apache HTTP Server.
Apr 17 12:19:15 linux200.example.com systemd[1]: Unit httpd.service entered failed state.
Apr 17 12:19:15 linux200.example.com systemd[1]: httpd.service failed.
[root@linux200 ~]# vi /etc/httpd/conf.d/mod_security.conf 

systemctl status httpd를 해보면 error가 난 부분을 확인할 수 있다.

이런 에러같은 경우는 통상 설정파일 작업 중 오타가 난 경우가 많은 것 같다.

여러분들도 오타를 잘 확인해 보시길.