我在配置nginx的时候无法启动文件

新手上路,请多包涵
root@localhost:/etc/nginx# nginx
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

我在部署django项目的时候,出现502 Bad Gateway的错误,然后我开始查找原因,但是这时候nginx不能运行起来了,请问这是什么愿意呢

阅读 3.1k
4 个回答

输出很明白啊 端口被占用了 换个

端口被占用,去nginx.conf改一下就OK了

listen 80; #端口修改下 8080 或其他

nginx -t 测试修改是否没问题

文中的英文翻译过来就是,地址已经被使用。对于Linux服务类的软件提示这个,是因为端口被使用了。解决的办法可以将你现在的端口改为其他未使用的端口,或者停掉之前占有该端口的服务。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题