在启动Apache的时候报错:
Permission denied: AH00072: make_sock: could not bind to address [::]:84
这个好像是因为Selinux的安全策略引起的,为了主机的安全,它不允许访问不在它策略中指定的端口
解决方法:
#查看selinux的端口
[root@moc1 ~]# semanage port -l|grep http
http_cache_port_t tcp 8080, 8118, 10001-10010
http_cache_port_t udp 3130
http_port_t tcp 81, 80, 443, 488, 8008, 8009, 8443
pegasus_http_port_t tcp 5988
pegasus_https_port_t tcp 5989
#添加端口
[root@moc1 ~]# semanage port -a -t http_port_t -p tcp 84
如果没有semanage命令
-bash: semanage: command not found
则需要安装,安装命令
[root@moc1 ~]# yum -y install semanage
也可以选择关闭Selinux
1,临时关闭
[root@moc1 ~]# setenforce 0
2,永久关闭
[root@localhost ~]# vim /etc/selinux/config
#SELINUX=enforcing #注释掉
#SELINUXTYPE=targeted #注释掉
SELINUX=disabled #增加
保存退出
#使配置立即生效
[root@moc1 ~]# setenforce 0