微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Nginx错误与端口80

我试图让我的Django应用程序运行在VPS上,而且我根据本教程做了所有的事情,但是我得到了502错误

我假设Nginx正在监听80端口(对吗?),因为sudo netstat -nlp | grep 80 sudo netstat -nlp | grep 80投掷:

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 892/Nginx tcp6 0 0 :::80 :::* LISTEN 892/Nginx unix 2 [ ACC ] STREAM LISTENING 8942 805/acpid /var/run/acpid.socket

但是,当我inputsudo Nginx似乎Nginx 听80端口…:

`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()`

我的Nginxconfiguration:

uWsgiconfiguration问题:uwsgi失败,没有任何错误消息。

如何在Windows XP上的XMPP上设置Django

Nginx上更改头文件'Django administration'文本

使用Apache,Django,pywin32,Python2.7和mod_wsgi找不到pywintypes27.dll

Celery + Django:无法在Windows 7上启动celerybeat

server { server_name 95.85.34.87; access_log off; location /static/ { alias /opt/myenv/static/; } location / { proxy_pass http://127.0.0.1:8001; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR nor ONL UNI COM NAV"'; } }

任何人都可以帮我吗?

550 views.py:权限被拒绝

将计算密集的请求处理到Django Web应用程序,可能使用预分配RPC服务器

Django / Apache使用mod_wsgi冻结

2个Bitnami Django项目同时运行Apache Wsgi

如何使Python / Nginx / FastCGI在更新/更改时自动重新编译代码

我在netstat输出中看到的是,Nginx 已经在你的系统上运行了。 在Debian或者Ubuntu等系统上,可能还有其他的* nix系统,当你安装Nginx的时候,它会被安装,以便在系统启动的时候启动。 然后,当您尝试从命令行运行它时,正在运行第二个实例,该实例尝试使用与引导时启动的实例相同的端口。 在Debian或者Ubuntu系统上,你可以停止Nginx开始:

$ sudo service Nginx stop $ sudo rm /etc/Nginx/sites-enabled/default

删除认设置可防止再次启动。 该文件是/etc/Nginx/sites-available/default的符号链接,因此如果需要,您可以轻松地重新创建它。

或者,如果要保持在启动时启动的Nginx在其端口上运行,则可以使用从使用不同端口的命令行启动的Nginx配置,例如:

server { listen 3333 default_server; listen [::]:3333 default_server ipv6only=on;

附加说明:如果你把你的站点放在/etc/Nginx/sites-enabled/那么你不能从命令行启动你的Nginx实例。 你只能通过sudo service Nginx [...]控制Nginx sudo service Nginx [...] 。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐