How to Install the Latest Version of Nginx on Ubuntu Bionic
Nginx.org maintains a repository for Ubuntu. We can use this repository to install the latest version of Nginx.
First off, let’s create a repository source file for Nginx with the following command.
1 vim /etc/apt/sources.list.d/nginx.list Paste in the following two lines to the file:
deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu/ bionic nginx deb-src http://nginx.org/packages/mainline/ubuntu/ bionic nginx In order to verify the integrity of packages downloaded from this repository, we need to import Nginx public key using the commands below.