Nginx启动时提示nginx: [emerg] still could not bind()

简介: Nginx启动时提示nginx: [emerg] still could not bind()

启动Nginx报这个nginx: [emerg] still could not bind()。

问题原因

nginx启动要使用的端口被占用了

解决方法:

1、根据Nginx配置文件查看配置的端口默认的是80端口,然后我们输出指令查看端口占用情况。

输入命令:

netstat -ntlp|grep 80

然后我们可以发现64930端口给占用了。

2、输入kill命令杀死占用进程

kill -9 64930(进程号根据你自己的来输入)

3、重启Nginx

输入./nginx命令

就不会报错了

目录
相关文章
|
7月前
|
应用服务中间件 网络安全 nginx
Nginx配置SSL证书时——nginx:[emerg]unknowndirectivessl错误
Nginx配置SSL证书时——nginx:[emerg]unknowndirectivessl错误
1453 0
|
应用服务中间件 nginx
Mac Nginx nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp“ failed ...
Mac Nginx nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp“ failed ...
313 2
|
4月前
|
存储 应用服务中间件 nginx
成功解决:nginx: [emerg] unexpected “}“ in /etc/nginx/conf.d/gulimall.conf:10
这篇文章详细介绍了Linux虚拟机磁盘空间不足时的扩容流程,从外部配置到具体扩容操作,再到验证扩容效果的步骤。同时,也探讨了Docker容器磁盘空间耗尽的问题,并提供了解决方案,包括删除无用镜像和容器,以及如何重新配置Docker的存储位置。文章还涵盖了一些意外情况的处理方法,比如误删容器后的恢复策略,并最终展示了使用Docker安装nginx并成功访问的详细过程。
成功解决:nginx: [emerg] unexpected “}“ in /etc/nginx/conf.d/gulimall.conf:10
|
应用服务中间件 nginx
Nginx nginx: [emerg] bind() to 0.0.0.0:8083 failed (48: Address already in use)
Nginx nginx: [emerg] bind() to 0.0.0.0:8083 failed (48: Address already in use)
433 1
|
7月前
|
应用服务中间件 nginx Windows
【报错】Windows下启动nginx报:bind() to 0.0.0.0:80 failed...
【报错】Windows下启动nginx报:bind() to 0.0.0.0:80 failed...
244 0
|
7月前
|
应用服务中间件 网络安全 nginx
解决nginx:[emerg]unknown directive ssl错误
解决nginx:[emerg]unknown directive ssl错误
1704 0
|
7月前
|
应用服务中间件 nginx C++
nginx: [emerg] unknown directive “rtmp“ in ./../conf/nginx.conf:16
nginx: [emerg] unknown directive “rtmp“ in ./../conf/nginx.conf:16
|
应用服务中间件 网络安全 nginx
nginx开启ssl报错: [emerg] "server" directive is not allowed here ...
nginx开启ssl报错: [emerg] "server" directive is not allowed here ...
364 0
|
应用服务中间件 nginx
Nginx nginx: [emerg] mkdir() "/usr/local/var/run/nginx/client_body_temp"
Nginx nginx: [emerg] mkdir() "/usr/local/var/run/nginx/client_body_temp"
454 0
|
应用服务中间件 nginx
nginx: [emerg] duplicate location “/“ in /usr/local/etc/nginx/nginx.conf:142
nginx: [emerg] duplicate location “/“ in /usr/local/etc/nginx/nginx.conf:142
429 0