1

我正在在线学习本教程https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.html

我进入了一个中间步骤,我想检查我是否可以访问 IP 地址上的应用程序。我运行python manage.py runserver 0.0.0.0:8000它返回以下内容:

System check identified no issues (0 silenced).
November 22, 2018 - 17:41:08
Django version 2.1.3, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

所以没有错误。然后我导航到my_droplet_ip:8000,我得到了超时。“花了很长时间才回应。”

我正在从用户而不是 root 运行 runserver 命令。不知道有没有关系...

知道这里发生了什么吗?

4

1 回答 1

2

我必须通过运行命令来公开端口 8000 sudo ufw allow 8080。教程中没有提到...

于 2018-11-23T11:38:16.963 回答