본문 바로가기

WEB-SERVER/OHS & JBCS & Apache

[Apache2.4] systemctl start httpd가 안 된다면..

728x90
[root@test1 conf]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@test1 conf]# 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 Thu 2024-02-22 13:26:13 KST; 11s ago
     Docs: man:httpd.service(8)
  Process: 3084 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 3084 (code=exited, status=1/FAILURE)
   Status: "Reading configuration..."

Feb 22 13:26:13 test1 systemd[1]: Starting The Apache HTTP Server...
Feb 22 13:26:13 test1 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Feb 22 13:26:13 test1 systemd[1]: httpd.service: Failed with result 'exit-code'.
Feb 22 13:26:13 test1 systemd[1]: Failed to start The Apache HTTP Server.

 

yum install httpd 를 통해서 apache webserver를 설치를 하였고,

기동하려는 찰나에 위와 같은 로그를 뱉어내며 실행이 안된다면,

SELinuxEnforcing 상태인지 확인을 하자

 

[root@test1 conf]# getenforce
Enforcing
[root@test1 conf]#

 

[조치 방안]

Permissive 상태로 만들자

[root@test1 conf]# setenforce 0
[root@test1 conf]# getenforce
Permissive
[root@test1 conf]#
[root@test1 conf]# systemctl start httpd
[root@test1 conf]# ps -ef |grep httpd
root        3163       1  0 13:31 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache      3166    3163  0 13:31 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache      3167    3163  0 13:31 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache      3168    3163  0 13:31 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache      3169    3163  0 13:31 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
root        3410    2146  0 13:31 pts/0    00:00:00 grep --color=auto httpd
[root@test1 conf]#