Run the command to add the correct repo and update the system/install the new nginx version:
For nginx mainline:
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.mainline.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo && yum update
For nginx stable:
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo && yum update
After you update nginx, openssl also is updated and you can use http/2.