Install the latest version of Nginx on Ubuntu

If you are looking to install the most current version of nginx on Ubuntu you can add the following apt source.

add-apt-repository ppa:nginx/stable

If you are wanting to install the latest development version you can use the following source instead

add-apt-repository ppa:nginx/development

After adding the source you can then update and then apt-get install nginx and you are all set.
If you haven’t installed via ppa on your system you will likely have to install the following packages

apt-get install python-software-properties software-properties-common