【问题标题】:Why i am getting : (13)Permission denied: make_sock: could not bind to address [::]:2244 error为什么我得到:(13)权限被拒绝:make_sock:无法绑定到地址[::]:2244错误
【发布时间】:2016-05-10 11:54:58
【问题描述】:

当我启动 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 用户身份运行它。 我怎样才能解决这个问题 ?

【问题讨论】:

  • 地址有问题,如果我没记错的话:0.0.0.0 是保留的。 .. 那,检查套接字是否没有被使用?
  • This answer suggets SELinux 是罪魁祸首。
  • 不,它不是 CentOS 。它是红帽。 @dusan.bajic
  • 但在我的 httpd.conf 中我定义为 Listen 192.168.2.2:2244 和 ----- -----

标签: linux apache webserver


【解决方案1】:

/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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-12
    • 1970-01-01
    • 2014-12-10
    • 2018-07-19
    • 2017-04-04
    • 2013-01-25
    • 1970-01-01
    • 2016-11-11
    相关资源
    最近更新 更多