title: bug in nginx config with django in aws
body: <p>So, I'm learning django using the book "TDD with Python" and in the chapter I am, we have to deploy an app to the live internet.</p>
  
  <p>I have an instance up and running (ubuntu) in amazon web services. It has its own elastic IP already. I log into it using ssh from bash.</p>
  
  <p>I installed a VE in the server and another directory containing my django project. All of this is well wired because I can start the development server with django (python3 manage.py runserver)</p>
  
  <p>I'm supposed to config nginx so when the server receives an http request, It is passed along to django (<a href="http://localhost:8000/" rel="nofollow">http://localhost:8000/</a>). Then django can take it from here.</p>
  
  <p>Following the book's indications, I created a file at server: /etc/nginx/sites-available/MY-SERVER-ELASTIC-IP</p>
  
  <p>with the following code:</p>
  
  <pre><code>server {
      listen 80;
      server_name superlists-staging.ottg.eu;
      location / {
          proxy_pass http://localhost:8000;
      }
  }
  </code></pre>
  
  <p>Then I created a symlink to the 'enabled-sites' directory using:</p>
  
  <pre><code>My-username@server:$ sudo ln -s ../sites-available/SERVER-ELASTIC-IP \
  /etc/nginx/sites-enabled/SERVER-ELASTIC-IP
  </code></pre>
  
  <p>My aws instace accepts http and https requests from any host.</p>
  
  <p>Please help me to see the (probably obvious) solution to this faulty config because it's really killing me.</p>
  
  <p>Thank you.</p>