没有任何其他程序占用80端口,而是nginx自己先绑定了80端口,又重复绑定而造成的。有些人建议在nginx.conf文件中添加
而事实上这种做法会导致重复绑定:
Starting nginx daemon: nginx[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()
nginx already running.
在Nginx论坛看到的,同时绑定IPv4和IPv6地址时应当写为:
listen 80; listen [::]:80 ipv6only=on;
重启Nginx即可。
转自:管理员在2009年8月13日编辑了该文章文章。
阅读(3531) | 评论(0) | 转发(0) |