Upgrading nginx on Centos 6.8
<p>I'm trying to update Nginx on Centos 6.8. I tried </p>

<pre><code>sudo vi /etc/yum.repos.d/nginx.repo
</code></pre>

<p>and then changing the nginx.repo to</p>

<pre><code>[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
</code></pre>

<p>and then ran:</p>

<pre><code>sudo yum update &amp;&amp; sudo yum install nginx
</code></pre>

<p>But when I check the version with <code>nginx -v</code>, it's still version 1.9.2.
I also tried quitting and reloading, but neither did anything. 
Also tried:</p>

<pre><code>cd /opt
wget http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.10.1-1.el6.ngx.x86_64.rpm
yum update nginx-1.10.1-1.el6.ngx.x86_64.rpm
</code></pre>

<p>Could someone point me in the right direction?</p>