How to install latest NGINX build on Ubuntu Server

NGINX is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The NGINX project started with a strong focus on high concurrency, high performance, and low memory usage. NGINX serves static content more efficiently than most of the more commonly used web server like Apache HTTP Server.

NGINX offers official PPA that comes with two options Mainline and Stable build. Stable builds are a bit older builds that have been tested to have rock solid stability compared to Mainline builds of NGINX. The Mainline build of NGINX can be also called development builds of NGINX, Mainline has more features than the Stable builds, Mainline is also not completely bug free, Mainline is only recommended if you want to use the latest and greatest version of NGINX for various reasons or to just to have the latest version.

I use a Stable version of NGINX on my production server and run the development or Mainline version of NGINX on my development server with the latest version of PHP.

Installing stable build (production server)

sudo apt-add-repository ppa:nginx/stable

Installing development build (local/testing/development) Don’t run in production

sudo apt-add-repository ppa:nginx/development  

Now we can update the local database.

sudo apt-get update Now we can install NGINX  
sudo apt-get install nginx-full  

Starting NGINX.

sudo /etc/init.d/nginx start  

Now you can visit 127.0.0.1.

2 Replies to “How to install latest NGINX build on Ubuntu Server”

    1. Back when I had written this post the NGINX stable release did not offer certain features that is available now in the current stable, now that you mentioned it in the comment, I will add development as a secondary option,

      Thank you for commenting, worked as a reminder for me.
      Hope you enjoyed the read.

Leave a Reply