I have tried this tutorial http://adrian.org.ar/python/django-nginx-green-unicorn-in-an-ubuntu-11-10-ec2-instance to setup django with ngnix and gunicorn.I have installed django and gunicorn in virtualenv environment.Everthing has got installed perfectly and even every command works.When i try this command gunicorn_django -b 0.0.0.0:8000
after going into my django app folder it starts gunicorn and shows following on shell:
2012-05-22 13:22:38 [3146] [INFO] Starting gunicorn 0.14.3
2012-05-22 13:22:38 [3146] [INFO] Listening at: http://0.0.0.0:8000 (3146)
2012-05-22 13:22:38 [3146] [INFO] Using worker: sync
2012-05-22 13:22:38 [3149] [INFO] Booting worker with pid: 3149
But if i goto my amazon DNS http://ec2-XX-XX-XXX-XXX.compute-1.amazonaws.com:8000/
through browser i got nothing and broswer simply shows " could not found/connect" message.But if I goto http://ec2-XX-XX-XXX-XXX.compute-1.amazonaws.com
through browser it shows Ngnix welcome page.I dont know why is gunicorn not returning me Django welcome page when i Goto http://ec2-XX-XX-XXX-XXX.compute-1.amazonaws.com:8000
.I cant even see any GET request log in shell coming to gunicorn worker.I have trying changing port with gunicorn_django command but had no luck and got same result gunicorn doesnot serve any page.
Please note I am using django-nonrel.
it looks like you need to configure the security group that control the access to your EC2 instance.
You should end with something like this:
https://skitch.com/ikis/8h1tc/aws-management-console
In my example, 22, 80 and 8000 are opened to world.