If you are interested to know, why do we use Nginx in front of an application such as Flask, Django, Ruby on Rails, NodeJS, etc?

When you have an Ubuntu or any Linux server and want to set up Flask application using Nginx and uWSGI, you need to log in as your non-root user to begin using:

ssh ip_address

Step 1 — Installing Nginx

Because Nginx is available in Ubuntu’s default repositories, it is possible to install it from these repositories using the apt packaging system.

Since this is our first interaction with the apt packaging system in this session, we will update our local package index so that we have access to the most recent package listings. Afterward, we can install nginx:

sudo apt-get update
sudo apt-get install nginx

Step 2 — Checking your Web Server

At the end of the installation process, Ubuntu 18.04 starts Nginx. The web server should already be up and running.

We can check with the systemd init system to make sure the service is running by typing:

sudo systemctl status nginx

As you can see below, the service appears to have started successfully.

#nginx #deployment #flask #python #wsgi #ubuntu 18.04

Deploy Flask Applications With uWSGI and Nginx on Ubuntu 18.04
2.20 GEEK