NGINX on Ubuntu

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 the most important, web server. NGINX uses PHP-FPM to process PHP files.

Official NGINX ppa is available for Ubuntu that installs the latest stable version of NGINX available for the specific version Ubuntu on your system is running.

If you are running Ubuntu Server (Ubuntu desktop build already comes with this package).

“` sudo apt-get install software-properties-common “`

Adding NGINX ppa to your system

“` sudo apt-add repository ppa:nginx/stable “`

Updating your local package manager database.

“` sudo apt-get update “`

Installing NGINX

“` sudo apt-get install nginx-full “`

Installing PHP-FPM (NGINX will process php files).

“` sudo apt-get install php5-fpm “`

Add the following lines to your nginx config `/etc/nginx/sites-enabled/default`.