Heads up! This post was written 10 years ago. Some information might be outdated or may have changed since then.
We know that sometimes the guys from ubuntu don't update repositories with latest versions of software, so there is quick way to use official nginx repo for installing it.
#Add nginx keys
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -

#Backup current sources
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

#Add following repositories to `/etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list

#Update repositories and install nginx
sudo apt-get update
sudo apt-get install nginx

Back to all posts