In this article we will install latest nginx/1.14.1 in Centos 7.
1. Remove current version of nginx (1.12.2)
sudo yum remove nginx*
sudo yum remove nginx*
[centos@ip-172-31-37-214 ~]$ ls -la /etc/nginx total 56 drwxr-xr-x. 3 root root 4096 Nov 7 07:41 . drwxr-xr-x. 91 root root 8192 Nov 7 07:28 .. drwxr-xr-x. 2 root root 89 Nov 7 07:37 conf.d -rw-r--r--. 1 root root 1007 Nov 6 14:04 fastcgi_params -rw-r--r--. 1 root root 2837 Nov 6 14:04 koi-utf -rw-r--r--. 1 root root 2223 Nov 6 14:04 koi-win -rw-r--r--. 1 root root 5170 Nov 6 14:04 mime.types lrwxrwxrwx. 1 root root 29 Nov 7 07:28 modules -> ../../usr/lib64/nginx/modules -rw-r--r--. 1 root root 643 Nov 6 13:54 nginx.conf -rw-r--r--. 1 root root 636 Nov 6 14:04 scgi_params -rw-r--r--. 1 root root 664 Nov 6 14:04 uwsgi_params -rw-r--r--. 1 root root 3610 Nov 6 14:04 win-utf
uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: ...
[error] 1057#0: *70 upstream prematurely closed connection while reading response header from upstream