gpt4 book ai didi

linux - 为什么我得到:(13)Permission denied: make_sock: could not bind to address [::]:2244 error

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:24:47 29 4
gpt4 key购买 nike

当我启动 apache 服务器时,出现类似

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

最佳答案

/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

关于linux - 为什么我得到:(13)Permission denied: make_sock: could not bind to address [::]:2244 error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37137804/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com