Install Latest Stable Nginx on Ubuntu


1 min read


If you install nginx on Ubuntu 18.04, the default version is 1.14.0. If you want to install the latest stable version, use the command below:

$ su
$ add-apt-repository ppa:nginx/stable
$ apt update
$ apt install nginx
# check the version again
$ nginx -v
nginx version: nginx/1.18.0 (Ubuntu)

During the install, it will ask if you want to overwrite your current nginx.conf file, select Y or N based on your use case.