Gunicorn - cannot access the Django project (time in the browser)

Using AWS and Gunicorn, my Django site is accessible and fully functional if I deploy the built-in Django server, but I cannot access it through Gunicorn.

If I try:

gunicorn MyApp.wsgi

It seems to run:

[2015-11-18 17:53:30 +0000] [18752] [INFO] Starting gunicorn 19.3.0
[2015-11-18 17:53:30 +0000] [18752] [INFO] Listening at: http://0.0.0.0:8001 (18752)
[2015-11-18 17:53:30 +0000] [18752] [INFO] Using worker: sync
[2015-11-18 17:53:30 +0000] [18755] [INFO] Booting worker with pid: 18755

But the browser simply returns the Nginx popup page to the main URL / IP address and the timeout when trying to visit <url>:8001or <ip_address>:8001.

I get the same result if I run:

gunicorn MyApp.wsgi:application --bind 0.0.0.0:8001

EDIT: if I try to use the same command with a specific URL instead 0.0.0.0, it will output the following:

[2015-11-18 18:24:17 +0000] [18902] [INFO] Starting gunicorn 19.3.0
[2015-11-18 18:24:17 +0000] [18902] [ERROR] Retrying in 1 second.
[2015-11-18 18:24:18 +0000] [18902] [ERROR] Retrying in 1 second.
[2015-11-18 18:24:19 +0000] [18902] [ERROR] Retrying in 1 second.
[2015-11-18 18:24:20 +0000] [18902] [ERROR] Retrying in 1 second.
[2015-11-18 18:24:21 +0000] [18902] [ERROR] Retrying in 1 second.
[2015-11-18 18:24:22 +0000] [18902] [ERROR] Can't connect to ('myurl.xyz', 8001)

If I use the IP address of the server, I see:

[2015-11-18 18:26:22 +0000] [18911] [INFO] Starting gunicorn 19.3.0
[2015-11-18 18:26:22 +0000] [18911] [ERROR] Invalid address: ('<my_ip>', 8001)

3 , uWSGI , 2- Gunicorn, . , , . , , - , , , ?

IP- URL- ALLOWED_HOSTS Django.

+3
1

, Amazon, , , , .

Nginx,

gunicorn MyApp.wsgi:application --bind=172.31.21.65:8000

.

+1
source

All Articles