nginx 绑定80端口失败怎么解决?

时间:2026-02-13 16:51:43

1、使用systemctl status nginx.service -l 查看详情

部分详情:

 nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] still could not bind()

Aug 06 14:08:30 jumpserver systemd[1]: nginx.service: control process exited, code=exited status=1

Aug 06 14:08:30 jumpserver systemd[1]: Failed to start The nginx HTTP and reverse proxy server.

nginx 绑定80端口失败怎么解决?

2、从错误中可以看出失败的原因是80端口被占用,所以造成nginx http和反向代理服务没法重启

先使用,ps- ef |grep 80

3、然后找到端口号,使有kill命令杀死进程。

kill -p 

重启依然,报出错

4、最后使用fuser命令:

sudo fuser -k 80/tcp 

nginx 绑定80端口失败怎么解决?

5、因为80端口是专用端口,需要使用sudo命令

fuser命令 识别正在对某个文件或端口访问的进程

-k参数:杀掉访问文件的进程。

6、重启nginx 

service nginx reload

nginx http和反向代理服务已经可以正常重启了。

nginx 绑定80端口失败怎么解决?

© 2026 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com