Setup Nginx Server Blocks In Ubuntu 18.04 LTS Make sure you have updated your Ubuntu system to most recent version. $ sudo apt-get update 1. Install Nginx webserver  To install Nginx webserver on Ubuntu, run: $ sudo apt-get install nginx Once Nginx installed, test whether it is working or not by browsing the nginx test