首页 > 代码库 > http启动时提示如下错误Permission denied

http启动时提示如下错误Permission denied


apache配置了多端口,启动时提示如下错误,原因是selinux开启导致

[root@zabbix-server-155 conf]# /etc/init.d/httpd start

Starting httpd: [Tue Dec 20 11:34:44 2016] [warn] NameVirtualHost *:80 has no VirtualHosts

(13)Permission denied: make_sock: could not bind to address [::]:8001

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8001

no listening sockets available, shutting down

Unable to open logs

                                                           [FAILED]


解决方法:

查看selinux状态

[root@zabbix-server-155 conf]# getenforce 

Enforcing(开启)


执行关闭selinux:setenforce 0

[root@zabbix-server-155 conf]# setenforce 0

[root@zabbix-server-155 conf]# getenforce 

Permissive


然后再启动就OK了

[root@zabbix-server-155 conf]# /etc/init.d/httpd start

Starting httpd: [Tue Dec 20 11:36:02 2016] [warn] NameVirtualHost *:80 has no VirtualHosts

                                                           [  OK  ]


本文出自 “11002498” 博客,请务必保留此出处http://11012498.blog.51cto.com/11002498/1884358

http启动时提示如下错误Permission denied