apache报Permission denied: make_sock: could not bin

来源:互联网 发布:阿里巴巴北京总部 知乎 编辑:程序博客网 时间:2024/06/05 16:36

启动Apache时报错信息:

[root@guest-4-205 httpd]# /etc/init.d/httpd start

Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:8000

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

no listening sockets available, shutting down

Unable to open logs

                                                           [FAILED]

查看selinux状态:

[root@guest-4-205 httpd]# sestatus

SELinux status:                 enabled

SELinuxfs mount:                /selinux

Current mode:                   permissive

Mode from config file:          enforcing

Policy version:                     24

Policy from config file:        targeted

解决方案:

增加selinux中http的端口

semanage port -l|grep http #查看SELinux下http相关端口

semanage port -a -t http_port_t -p tcp 8000 #增加这个非标准端口即可

[root@guest-4-205 httpd]# /etc/init.d/httpd status     

httpd (pid  32061) is running...

安装semanage

# yum -y install policycoreutils-python

阅读全文
0 0