Nginx 1.7.11 was released few days ago and this brief tutorial is going to show you how to install or upgrade to the latest version of Nginx on CentOS 7. If you’re not already using Nginx web server to power your blogs or websites, you should give it a try as it’s a very fast web server. It has helped us greatly on this blog.

Few years ago, we switched from Apache to Nginx to help speed up our web pages in order to rank better on Google’s search engine result pages. We did speed up our web pages, but we haven’t achieved better positions on Google search engine pages just yet.

While we have improved our site performance, we haven’t seen great results in our search ranking. It maybe because of other factors and not speed, but I don’t have clue why our web traffic has continued to decline.

Nginx version 1.7.11 released few days ago brought many new features and bug fixes. New features such as experimental thread pools support, client SSL certificates support in mail proxy, startup speedup when using the “hash … consistent” directive in the upstream block and many others.

The new version of Nginx also fixed issues related to SSL by enabling SLv3  support with LibreSSL, ignoring stale global SSL error … called a function you should not call alerts appeared in logs when using LibreSSL and  “proxy_cache_revalidate” directive error.

To get the last version of Nginx, you must install Nginx’s mainline repository onto your system. Nginx has two main repositories you can install software from.. The two repositories are stable and mainline. The stable repository contains software that are tested and proven to function with most systems. Less bugs are found in the stable repository as compared to the mainline.

The mainline repository contains the latest version of software that are not in the stable repository. So to get the latest version of Nginx, download and install the mainline repository. To do that, run the commands below to create a new Nginx’s repository file on your system

sudo vi /etc/yum.repos.d/nginx.repo

Then copy and paste these lines into the file and save it.

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

After that, run the command below to update your system

sudo yum update

Finally, to install Nginx, run the commands below.

sudo yum install nginx

After installing Nginx, run the commands below to view the current version installed on your system.

nginx -v

And you’ll see something like the line below.

nginx version: nginx/1.7.11

If you’re installing Nginx on a new CentOS machine, you must also enable HTTP/HTTPS ports to allow web traffic. Without opening these ports, your users may never see your web content.

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

That’s it!

Enjoy!

Frequently Asked Questions

How to upgrade Nginx to version 1.7.11 on CentOS 7?

To upgrade Nginx to version 1.7.11 on CentOS 7, you can follow the steps outlined in the article by installing Nginx's mainline repository onto your system.

What are the new features in Nginx version 1.7.11?

Nginx version 1.7.11 introduced new features such as experimental thread pools support, client SSL certificates support in mail proxy, and startup speedup when using the 'hash ... consistent' directive in the upstream block.

How does Nginx help in speeding up websites?

Nginx is known for being a very fast web server, which can help speed up websites by efficiently handling incoming web requests and serving web pages quickly.

What are the benefits of switching from Apache to Nginx?

Switching from Apache to Nginx can help improve site performance and speed up web pages, potentially leading to better search engine rankings and user experience.

How can Nginx improve website performance?

Nginx can improve website performance by efficiently handling web requests, reducing server load, and serving web pages quickly to visitors.

What are the differences between Nginx stable and mainline repositories?

The stable repository contains tested and proven software with fewer bugs, while the mainline repository offers the latest software versions that may have more features but could be less stable.

How to resolve SSL issues in Nginx version 1.7.11?

To resolve SSL issues in Nginx version 1.7.11, you can refer to the release notes for fixes related to SSL, such as enabling SSLv3 support with LibreSSL and addressing 'proxy_cache_revalidate' directive errors.

Why should I consider using Nginx for my blogs or websites?

You should consider using Nginx for your blogs or websites due to its reputation as a fast web server that can help improve site performance, speed up web pages, and enhance user experience.