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
you need to do an “apt-get update” before you can install the new package, after the repo is added.