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  ]