gpt4 book ai didi

python - Gunicorn 不是从端口 80 启动而是从端口 8000 启动

转载 作者:太空宇宙 更新时间:2023-11-03 16:03:08 24 4
gpt4 key购买 nike

我正在使用gunicorn并尝试编写 Upstart 脚本。我正在命令行中测试该命令,对于端口 80,它只是出现错误

命令

gunicorn --bind 0.0.0.0:80 --workers 3 myapp.wsgi:application

日志

[2016-10-19 02:36:51 +0000] [12752] [INFO] Starting gunicorn 19.6.0
[2016-10-19 02:36:51 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:52 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:53 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:54 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:55 +0000] [12752] [ERROR] Retrying in 1 second.
[2016-10-19 02:36:56 +0000] [12752] [ERROR] Can't connect to ('0.0.0.0', 80)

有什么想法为什么这不起作用吗?有时它适用于端口 8000。

最佳答案

您必须为此使用“sudo”命令。

sudo Gunicorn --bind 0.0.0.0:80 --workers 3 myapp.wsgi:application

端口 80 需要 super 用户权限。

关于python - Gunicorn 不是从端口 80 启动而是从端口 8000 启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40121221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com