apache報Permission denied: make_sock: could not bind to address 解決方案

啓動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...

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章