执行配置文件后出错,地址被占用

极客0001 Nginx 的基本配置 最后由 qq_哈里鸡 于03月10日回复

  • 3 回答
  • 1.2k 浏览

[root@iZ1xcZ conf]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/xunizhuji.conf 

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

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

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

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

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

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

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

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

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

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

nginx: [emerg] still could not bind()

  • 周文家 2017年09月07日 回答 #1楼
  • 主要在端口80   你电脑应该是开启了其它程序  正在使用80端口,  你要使用nginx可以先用命令结束80端口占用程序  也可以更改nginx的配置文件  修改服务端口

  • 0 评论
  • qq_哈里鸡 03月10日 回答 #3楼
  • sudo fuser -k 80/tcp #关闭占用80端口的程序

    使用上面命令后,再重启Nginx就正常了。

  • 0 评论