小编web*_*oss的帖子

端口是免费的,但是 Apache 失败了:“地址已经在使用中:make_sock:无法绑定到地址”

Apache (Linux Red Hat 4.1.x) 无法启动并显示消息:“地址已在使用中:make_sock:无法绑定到地址”。

# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: 
make_sock: could not bind to address 0.0.0.0:8000
no listening sockets available, shutting down
Unable to open logs
                                                       [FAILED]
Run Code Online (Sandbox Code Playgroud)

已经尝试做:

killall -9 httpd
Run Code Online (Sandbox Code Playgroud)

看起来 Apache 没有运行。端口 8000 如果空闲,则没有什么可以阻止 Apache 占用它。(nginx 是 :80 作为反向代理)

 # netstat -tulpn| grep :80
 tcp  0   0 0.0.0.0:8001    0.0.0.0:*   LISTEN 17181/DarwinStreami
 tcp  0   0 0.0.0.0:80      0.0.0.0:*   LISTEN 7962/nginx.conf
Run Code Online (Sandbox Code Playgroud)

可能有人会对如何解决这个问题有任何想法?

UPD1: Apache 配置选项是:

ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100 …
Run Code Online (Sandbox Code Playgroud)

rhel4 apache-2.2

2
推荐指数
1
解决办法
5581
查看次数

标签 统计

apache-2.2 ×1

rhel4 ×1