当我启动 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 并让它监听新端口。
关于linux - 为什么我得到:(13)Permission denied: make_sock: could not bind to address [::]:2244 error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37137804/