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

标签 linux apache webserver

当我启动 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/

相关文章:

linux - 正确释放和取消映射内核内存

c - 如何在服务器和客户端之间创建多个tcp连接

apache - 如何在 apache hadoop 2.7.1 之上安装 cloudera

http - 如何在 GO 中获取 LocalAddress?

html - 使用相同的浏览器时,字体在本地服务器和Web服务器上的呈现方式不同

python - 如果文件具有 CRLF 行结尾,为什么在类 unix 系统上通过 CGI/WSGI 运行的 python 脚本会失败?

linux - 添加用户以在 Buildroot 中为自定义包创建

apache - apache2 中的密码文件是什么?

linux - Subversion+Apache authz 未授权

linux - 用于组合多字段验证的 AWK 脚本