How To Install Nginx on Ubuntu 16.04

September 15, 2016

How To Install Nginx on Ubuntu 16.04

Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or a reverse proxy.

In this guide, we’ll discuss how to get Nginx installed on your Ubuntu 16.04 server.

  • Install Nginx on Ubuntu 16.04

First let’s start by ensuring your system is up-to-date.

Installing nginx package on Ubuntu 16.04 (Xenial Xerus) is as easy as running:

After that, run the commands to enable Nginx to automatically startup when your server starts:

To confirm if the Nginx service is indeed running, use the following command:

You can verify that Nginx is really running by opening your favorite web browser and entering the URL http://your-server’s – address, if it is installed.