我正在尝试在Ubuntu 11.04上设置Nginx.我按照这里的大致指示:
http://library.linode.com/frameworks/sinatra/debian-6-squeeze.我知道这是针对Debian的,但我基本上采取了这些步骤然后用Google搜索“如何在ubuntu 11.04中执行x”虽然我确实从他们的库中提取了init脚本.
Starting Nginx: Nginx: [emerg] bind() to 0.0.0.0: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 0.0.0.0: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 0.0.0.0:80 Failed (98: Address already in use) Nginx: [emerg] still Could not bind()
命令:’sudo lsof -i:80’不返回端口80上运行的任何内容.
我如何解决这个或任何可能出错的想法?
我看到Nginx + uWSGI on a fresh Ubuntu install – bind error port 80并尝试重新启动计算机并运行一次,我得到了同样的错误.运行一次之后,我运行了lsof命令.
UPDATE
sudo netstat -ltnp返回:
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1998/sshd tcp6 0 0 :::22 :::* LISTEN 1998/sshd
nestat -a返回:
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:ssh *:* LISTEN tcp 0 176 matterhorn.noahc.ne:ssh 173-26-190-206.cl:26467 ESTABLISHED tcp6 0 0 [::]:ssh [::]:* LISTEN udp 0 0 matterhorn.noahc.:35332 10504.x.rootbsd.net:ntp ESTABLISHED udp 0 0 matterhorn.noahc.:53298 tick.tadatv.com:ntp ESTABLISHED udp 0 0 matterhorn.noahc.:54371 ns1.baribault.net:ntp ESTABLISHED udp 0 0 matterhorn.noahc.:38304 tardis.chpc.utah.ed:ntp ESTABLISHED Active UNIX domain sockets (servers and established) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 684 @/com/ubuntu/upstart unix 2 [ ] DGRAM 730 @/org/kernel/udev/udevd unix 6 [ ] DGRAM 4316 /dev/log unix 2 [ ] DGRAM 11447 unix 3 [ ] STREAM CONNECTED 10466 unix 3 [ ] STREAM CONNECTED 10465 unix 2 [ ] DGRAM 11411 unix 3 [ ] STREAM CONNECTED 2958 unix 3 [ ] STREAM CONNECTED 2957 unix 2 [ ] DGRAM 4518 unix 2 [ ] DGRAM 2902 unix 2 [ ] DGRAM 2614 unix 3 [ ] STREAM CONNECTED 1284 @/com/ubuntu/upstart unix 3 [ ] STREAM CONNECTED 4131 unix 3 [ ] DGRAM 733 unix 3 [ ] DGRAM 732 unix 3 [ ] STREAM CONNECTED 1038 @/com/ubuntu/upstart unix 3 [ ] STREAM CONNECTED 2088
一种可能性是,由于某种原因,Nginx两次绑定到端口80.
如果它试图这样做,它将失败.一个例子可能是绑定到IPV6和IPV4,或者绑定到公共IP和通配符ip.
检查你的Nginx配置,确保它只绑定一次.
原文地址:https://www.jb51.cc/ubuntu/348154.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。