Start from Ubuntu
RuSITE | caorussell | March 10, 2020, 8:39 a.m.

While the virtual server and SSH client are ready, all the left are the software part.

The server is the base of all the software parts. So, a better server a better world. smiley

There are a few steps that should be done to the Ubuntu server.

1. Update and upgrade

First of all, update the Ubuntu package lists and upgrade all available software. The "sudo" stands for "superuser do".

sudo apt update
sudo apt upgrade

2. Python and Pip

The Python3 is my programming language, so now check for python and pip version, and make installation if necessary.

python --version
python3 --version
pip --version
pip3 --version
sudo apt install python3
sudo apt install python3-pip

Now the question is, how to make your site visible to others via the internet.

People launch a web browser(the web client), input a domain name, press ENTER, then, the browser starts to hand out the requests.

The domain name is translated to a certain public IP address by the DNS, which belongs to the virtual host you bought. And though the IP address, the location of the host will be found. Then, the connection between the browser and the host starts to build.

The web server of the host reads the requests from the web browser, and forward them to the backend through the socket.

The WSGI(Web Server Gateway Interface) is the go-between for the web server and the web application/framework(such as Django and Flask), and uWSGI is a special package for Python. By the way, WSGI pronounced whiskey.

the web client <-> the web server <-> the socket <-> uWSGI <-> Django


3. Django

Install the Django, and make sure it works.

sudo python3 -m pip install django
django-admin


4. uWSGI

Install the uWSGI.

sudo python3 -m pip install uwsgi

5. Nginx

Install the Nginx.

sudo apt install nginx

The next step will make my site open to the world.