How To Install Nginx on Ubuntu 16.04?

NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. It started out as a web server designed for maximum performance and stability.

In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverse proxy and load balancer for HTTP, TCP, and UDP servers.

With this tutorial we are going to explore how we can install “Nginx” step by step.

1. Open “Terminal”, and update all of the packages by using the below command.

sudo apt-get update

Install Nginx

2. Install “Nginx” through the below command from “Terminal”.

sudo apt-get install nginx

type “Y” and press Enter to continue.

3. Now let’s adjust Linux firewall to allow the access to “Nginx” service, we need first to check the applications that the firewall knows how to work, we can do that through the below command.

sudo ufw app list

4. As it’s show on the above screenshot, “Nginx” got 3 profiles and we need to enable the most restrictive profile that will allow traffic, since we haven’t configure SSL for our server yet, we have to allow the profile with port 80 and sure we will allow “Ngninx HTTP” profile, we can do this through the below command.

sudo ufw allow ‘Nginx HTTP’

5. To make sure that our changes take effect we can check the status of firewall by below command.

sudo ufw status

as the screenshot shows that “Nginx HTTP” profile is allowed.

6. We can check if the service of Nginx is running by below command.

sudo systemctl status nginx

7. Now our Nginx server is running, we can make sure of that by entering our local IP address on the browser.

Now our Nginx is fully installed and working successfully, for any inquiry relating to the installation process, please don’t hesitate to leave a comment below and I will reply you ASAP.

Miguel

I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...