Can't reach Django default app via Gunicorn on AWS EC2 instance

纵然是瞬间 提交于 2019-12-06 02:55:01

I repeated my configuration process line-for-line on my Linode server and had no problems at all. I have to assume that this problem has something to do with the way AWS EC2 instances are configured, probably with respect to security.

Adam Starrh

I was running into the same problem today. Daniel Roseman explained it to me in the comments here:

port 8000 is not open to the outside by default; you'd either need to fiddle with your load balancer/firewall settings to open it, or run gunicorn on port 80 (which will mean killing nginx and starting gunicorn as the superuser). Much easier to just get the nginx settings right; there is a perfectly usable configuration on the gunicorn deploy docs page.

It seems it's possible to run Gunicorn directly, but EC2 isn't set up to do so by default.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!