title: Django in Ubuntu 18.04 on Azure VM gunicorn Can't connect to ('0.0.0.0', 80)
body: <p>I'm trying to deploy my Django application to Azure virtual machine with Ubuntu 18.04.</p>
  
  <ol>
  <li>I have set up the VM and connect to it via SSH.</li>
  <li>Then run the update and upgrade command</li>
  <li>Setup Python and Virtualenvironment </li>
  <li>Upload my code and activate the environment</li>
  <li>Allow the port <code>8000</code> using <code>sudo ufw allow 8000</code> for testing</li>
  <li><p>After installing all the requirements, when I run the command:</p>
  
  <pre><code>python manage.py runserver 0.0.0.0:8000
  </code></pre></li>
  </ol>
  
  <p>The application runs, but when I open the URL as: :8000/</p>
  
  <p>It doesn't return anything not any errors in the console</p>
  
  <blockquote>
    <p><strong>Update:</strong> 
    It's just fixed by manually adding the port <code>8000</code> in azure portal under <code>Inbound port rules</code>.
    But: when I try to run it via gunicorn as:</p>
  </blockquote>
  
  <pre><code>gunicorn --pythonpath PROJECT PROJECT.wsgi:application --log-file - --bind 0.0.0.0:80
  </code></pre>
  
  <p>it returns another error as below:</p>
  
  <blockquote>
    <p>[30007] [ERROR] Can't connect to ('0.0.0.0', 80)</p>
  </blockquote>
  
  <p>What can be wrong here?</p>