Nginx is a much lighter web server than Apache. This web server has become quite popular in the recent years. The Apache web server can be quite complex to configure and use. However, Nginx is much simpler. This chapter will focus on how to install this light web server.
To install Nginx, following are the steps −
Step 1 − Open the command terminal on Ubuntu desktop and run the following command.
sudo apt-get update
This first ensures that all packages on the operating system are up to date.
Step 2 − Next enter the following command to install the nginx server.
sudo apt-get install nginx
Step 3 − Once done, if we run ps –ef | grep nginx, we can see the process for the web server in a running state.
We now have nginx run as a web server on Ubuntu.