为什么我得到:(13)权限被拒绝:make_sock:无法绑定到地址[::]:2244错误

时间:2016-05-10 11:54:58

标签: linux apache webserver

当我启动apche服务器时,我收到错误

[root@ram conf]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for ram
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:2244
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:2244
no listening sockets available, shutting down
Unable to open logs

我以root用户身份运行它。 我怎样才能解决这个问题 ?

1 个答案:

答案 0 :(得分:0)

/etc/httpd/conf/httpd.conf配置为httpd侦听TCP端口80,443,488,8008,8009或8443以外的端口时,必须使用semanage port命令添加新端口号到SELinux策略配置。

semanage port -a -t http_port_t -p tcp 12345

再次运行service httpd start以启动httpd并让它侦听新端口。

来自The Apache HTTP Server and SELinux