[root@localhost ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-05-17 09:44:33 CST; 43s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 1163 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 1162 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1162 (code=exited, status=1/FAILURE)
May 17 09:44:33 localhost.localdomain httpd[1162]: (13)Permission denied: AH00072: make_sock: could not b...808
May 17 09:44:33 localhost.localdomain httpd[1162]: (13)Permission denied: AH00072: make_sock: could not b...808
May 17 09:44:33 localhost.localdomain httpd[1162]: no listening sockets available, shutting down
May 17 09:44:33 localhost.localdomain httpd[1162]: AH00015: Unable to open logs
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, statu...LURE
May 17 09:44:33 localhost.localdomain kill[1163]: kill: cannot find process ""
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
May 17 09:44:33 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
May 17 09:44:33 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# setenforce 1
[root@localhost ~]# systemctl restart httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-05-17 09:44:33 CST; 43s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 1163 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 1162 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1162 (code=exited, status=1/FAILURE)
May 17 09:44:33 localhost.localdomain httpd[1162]: (13)Permission denied: AH00072: make_sock: could not b...808
May 17 09:44:33 localhost.localdomain httpd[1162]: (13)Permission denied: AH00072: make_sock: could not b...808
May 17 09:44:33 localhost.localdomain httpd[1162]: no listening sockets available, shutting down
May 17 09:44:33 localhost.localdomain httpd[1162]: AH00015: Unable to open logs
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, statu...LURE
May 17 09:44:33 localhost.localdomain kill[1163]: kill: cannot find process ""
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
May 17 09:44:33 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
May 17 09:44:33 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# setenforce 1
[root@localhost ~]# 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.
得出的结果确实是selinux导致的,但是网络上都是说关闭selinux来解决,为什么不能就更改selinux策略来解决呢?