Django in Ubuntu 18.04 on Azure VM gunicorn Can't connect to ('0.0.0.0', 80)

Django in Ubuntu 18.04 on Azure VM gunicorn Can't connect to ('0.0.0.0', 80)

I'm trying to deploy my Django application to Azure virtual machine with Ubuntu 18.04.

I'm trying to deploy my Django application to Azure virtual machine with Ubuntu 18.04.

  1. I have set up the VM and connect to it via SSH.
  2. Then run the update and upgrade command
  3. Setup Python and Virtualenvironment
  4. Upload my code and activate the environment
  5. Allow the port 8000 using sudo ufw allow 8000 for testing
  6. After installing all the requirements, when I run the command:
python manage.py runserver 0.0.0.0:8000

The application runs, but when I open the URL as: :8000/

It doesn't return anything not any errors in the console

Update: It's just fixed by manually adding the port 8000 in azure portal under Inbound port rules. But: when I try to run it via gunicorn as:
gunicorn --pythonpath PROJECT PROJECT.wsgi:application --log-file - --bind 0.0.0.0:80

it returns another error as below:

[30007] [ERROR] Can't connect to ('0.0.0.0', 80)

What can be wrong here?

python azure django ubuntu

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Python Django Tutorial | Django Course

🔥Intellipaat Django course: https://intellipaat.com/python-django-training/ 👉This Python Django tutorial will help you learn what is django web development &...

Basic Data Types in Python | Python Web Development For Beginners

In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.

Main Pros and Cons of Django As A Web Framework for Python Developers

India's best Institute for Django Online Training Course & Certification. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

How To Compare Tesla and Ford Company By Using Magic Methods in Python

Magic Methods are the special methods which gives us the ability to access built in syntactical features such as ‘<’, ‘>’, ‘==’, ‘+’ etc.. You must have worked with such methods without knowing them to be as magic methods. Magic methods can be identified with their names which start with __ and ends with __ like __init__, __call__, __str__ etc. These methods are also called Dunder Methods, because of their name starting and ending with Double Underscore (Dunder).

How to Install Pyenv on Ubuntu 18.04

How to Install Pyenv on Ubuntu 18.04 - What is Pyenv? Pyenv is a fantastic tool for installing and managing multiple Python versions. It enables a developer to quickly gain access to newer