Installing latest version of Nginx on Ubuntu


On Ubuntu, apt-get gives me an older version of Nginx. How do I install the latest version?


You can install the latest stable build of Nginx by using a PPA.

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

If you want to try something even newer you can replace stable with development for the mainline branch. The mainline branch gets new features and bugfixes sooner but might introduce new bugs as well.