Install and upgrade nginx on CentOS6

Nginx is a web server. It can act as a reverse proxy server, as well as a load balancer and an HTTP cache. There was a need for an nginx reverse proxy (RP), so found a set of instructions that worked. However, after implementing those instructions, and getting everything configured, it was a determined a newer version of Nginx was required for additional configuration options. It turns out that the upgrade would be easier than expected. Hopefully, this guide will assist those whom may have already installed Nginx, but needed to upgrade it, without wanted to compile source.

Install Nginx
This will install Nginx 1.0.15.

yum install -y epel-release
yum install -y nginx
chkconfig nginx on
service nginx start
lokkit -s http -s https

Upgrade nginx
This will upgrade Nginx to 1.8.1.

cd /opt
wget http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.8.1-1.el6.ngx.x86_64.rpm
yum update nginx-1.8.1-1.el6.ngx.x86_64.rpm

Alternately..

yum update http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.8.1-1.el6.ngx.x86_64.rpm

When complete, check the version.

nginx -v
nginx version: nginx/1.8.1

Source(s)
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-6-with-yum
http://nginx.org/packages/centos/6/x86_64/RPMS/