Author Topic: Old version of Nginx?  (Read 7281 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
Old version of Nginx?
« on: September 24, 2019, 02:19:06 PM »
I ran sucuri scan on one of my sites, and got a critical error about nginx version being too old (1.14.2, while it wants 1.17.3).
But I have not yum updates.


Checking the nginx website, it seems 1.14.2 is the most recent legacy version, while the mainline version is 1.17.3.
When will we get the newest nginx version?


Screenshot of Sucuri:


https://ibb.co/M6VVknQ

Offline
**
Re: Old version of Nginx?
« Reply #1 on: September 26, 2019, 05:53:39 AM »
Anyone?

Offline
**
Re: Old version of Nginx?
« Reply #2 on: September 26, 2019, 07:56:40 PM »
After reaching out to the support, where they wanted me to pay for technician support time (so why do I pay for the PRO version?), I've decided to do that myself. So I came back here to write it for others who might want to update their nginx as well.
Actually, all I needed to do is edit /etc/yum.repos.d/nginx.repo and changing it to read like this:

Code: [Select]
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

Note that the only change is changing "enabled=0" (in the original file) to "enabled=1".
Then run "yum update nginx".
You can tryp "nginx -v" to make sure the version was indeed updated.
Then restart nginx (can be done from CWP's dashboard) and you're done.

Offline
*
Re: Old version of Nginx?
« Reply #3 on: January 09, 2022, 12:03:02 PM »
I confirm this solution works.
just wanted to add that the yum update nginx creates a default config /etc/nginx/conf.d/default.conf with a localhost server listening on 80 port.
There is no such in CWP configuration and there is another one listening on 80 port, so you may want to disable this configuration otherwise you get this error in nginx log:
Code: [Select]
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)