Install nginx stable 1.4.1 on Debian Squeeze

nginx has some problems and the shipped version in Debian Squeeze is 0.7.67.
I thought it would be a good time to upgrade to the stable version directly from nginx’s repos.

#Start with downloading and installing PGP keys
wget -O key && sudo apt-key add key && sudo rm -f key

#Add these lines to /etc/apt/sources.list
deb squeeze nginx
deb-src squeeze nginx

#Update apt lists
sudo apt-get update

#Upgrade or install nginx
sudo apt-get upgrade
sudo apt-get install nginx

All done.