NGINX
Explore the role of NGINX in deploying web applications by learning how to install it, configure its settings to serve static front-end files, and proxy API requests to Flask backends. Understand key configuration options for routing, logging, and error handling to enable full application deployment.
What is NGINX?
Now that we have the back-end taken care of, we have to have something that can serve up the static files of the front-end application. NGINX is a highly efficient web server that is both very configurable and easy to implement.
Installing NGINX
Unlike Gunicorn, NGINX is not PIP installable and needs to be installed as a standalone application on your computer. The installation of Nginx will depend on what platform we are running it on and what package manager is required, but for a Linux distribution that uses APT, we can install it with this:
apt-get update
apt-get install nginx
If we have a Linux distribution that uses Yum for package management, we can use this:
yum update
yum install nginx
...