Nginx错误98.无法绑定到端口80

时间:2014-03-13 01:38:08

标签: nginx

我最近一直致力于将https添加到我的某个网站。一切看起来都很好,但是当我重新启动服务器时,我注意到只有使用http的网站会显示,而另一个网站则不会。正在运行sudo nginx给了我这个

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:443 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:443 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:443 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:443 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:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()

怪异。从来没有见过这样的东西。 我试着寻找答案,但我找不到任何东西。我从来没有在这台服务器上安装Apache,所以我们可以排除这种情况,从不打扰使用IPv6,似乎没什么用。

我试着回去听80端口,但是同样的错误不断涌现,只有没有443业务。

思想?

更新:我认为我修好了。

所以,我开始使用博客教程(http://michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/)来帮助我在开始之前建立一个nginx / gunicorn / django网站。无论出于何种原因,我决定改变这条线......

proxy_pass http://hello(请注意,请注意实际名称)

到此

proxy_pass https://hello

因为我使用的是https。不幸的是,这根本不是它的工作方式。因此,当我将内容更改回原来的proxy_pass http://hello行时,一切正常,我现在在我的网站上安装了https。

如果我运行sudo nginx,我仍然会得到与之前相同的错误,即“已使用的地址”错误。但是,一切似乎都有效。

愿我的拔毛时刻能帮助别人解决问题。

0 个答案:

没有答案