How to install Nginx on Ubuntu Operating System

Let’s jump right into it | how to install Nginx on ubuntu! 


OS Version: Ubuntu Os 18.04.3 (LTS) x64
Nginx version: nginx/1.14.0

Update OS:

bluegrid-edu:~# apt-get update

Install nginx:

bluegrid-edu:~# apt-get install nginx

Make sure it’s properly installed:

bluegrid-edu:~# systemctl status nginx
how to install nginx on ubuntu | check status
systemctl status nginx

Let’s just make sure it start automatically when the server is rebooted:

bluegrid-edu:~# systemctl enable nginx
how to install nginx on ubuntu | enable nginx
systemctl enable nginx


Now we have the Nginx installed and running. We can confirm that it serves the HTTP properly with the following command:

bluegrid-edu:~# curl -I localhost
how to install nginx on ubuntu | test via curl
Testing Nginx response via curl command
Share this post

Share this link via

Or copy link