Deploying Django With AWS
<p>So I am trying to <strong>deploy</strong> my <strong>django</strong> app(which mostly has REST Apis) but when I use Amazon CLI, I end up having <strong>Fedora instance</strong>, while I <strong>want</strong> to use <strong>Ubuntu instance</strong>. </p>

<p>So I tried to do this, I made an ubuntu instance, made a repository of my code, installed git on ubuntu and cloned the code from git to ubuntu. Next thing, I installed all the requirements.txt dependencies and everything is in virtualenv and working fine. </p>

<p>But here's the <strong>catch</strong>, <code>python manage.py runserver</code> runs it on <code>localhost</code>(not really surprising). So the question is, how to serve those apis(not on localhost)?</p>

<p>Don't use the <code>runserver</code> command on production. It's meant for local development only. </p>

<p>On production, you need to setup an application server (uwsgi / gunicorn) and then use nginx as a reverse proxy. </p>

<p>Digital Ocean articles are pretty good - <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-14-04" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-14-04</a> </p>

<p>(The same stuff apply for AWS as well)</p>

python django git amazon-web-services ubuntu