The nginx version that is shipped with CentOS epel repository is quite old.
To upgrade your nginx installation you need to create a repository and add nginx servers to it.
to do so create a file called nginx.repo on /etc/yum.repos.d/nginx.repo and place following content in it.
name=nginx stable repo
name=nginx mainline repo
then simply stop nginx service and run the yum update command.
systemctl stop nginx
yum update nginx
this will be using the latest stable package. if you want to use the latest mainline release you need to tell yum to use that one instead by running:
sudo yum-config-manager --enable nginx-mainline
Incoming search terms:
- upgrade nginx yum