sudo yum install gcc
sudo yum install make
sudo yum install pcre-devel
sudo yum install zlib-devel
sudo yum install make
sudo yum install pcre-devel
sudo yum install zlib-devel
wget nginx-x.x.x.tar.gz from nginx.org
tar -xvzf nginx-x.x.x.tar.gz
./configure --prefix=/opt/nginx
make
sudo make install
sudo /opt/nginx/sbin/nginx -c <location to conf>/conf/nginx.conf
copy conf directory from the nginx download to home directory
Note: make sure that in the conf the user is known user, 'nobody' is the default user and which would have permission issues to access files.