Home  >  Q&A  >  body text

centos7 - centOS update nginx version

I was going to upgrade the HTTP protocol a few days ago, put nginx update, and then actually check the version using:

nginx -V
// 返回的是 1.10

Then, after using nginx -s reload, the restart is normal. However, on the browser side, the plug-in shows that the Nginx version is still version 1.6. Moreover, the protocol has not been upgraded and is still HTTP1.1.
Has anyone encountered such a problem? Please answer.
The actual web page is: https://www.villainhr.com/

大家讲道理大家讲道理2713 days ago502

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 17:16:36

    It is best to compile and install nginx manually!

    • Manually compile and install openssl version is OpenSSL 1.0.2h

    • Manually compile and install nginx and add compilation parameters

       --with-http_ssl_module \
       --with-http_v2_module \
       --with-openssl=/usr/local/src/openssl-1.0.2h
      

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:16:36

    Nginx官方为RHEL/CentOS/Debian/Ubuntu/SLES提供了yum和apt源.

    Pre-Built Packages for Stable version

    To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
    gpgcheck=0
    enabled=1
    

    Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “5”, “6”, or “7”, for 5.x, 6.x, or 7.x versions, respectively.

    For Debian/Ubuntu, in order to authenticate the nginx repository signature and to eliminate warnings about missing PGP key during installation of the nginx package, it is necessary to add the key used to sign the nginx packages and repository to the apt program keyring. Please download this key from our web site, and add it to the apt program keyring with the following command:

    sudo apt-key add nginx_signing.key
    

    For Debian replace codename with Debian distribution codename, and append the following to the end of the /etc/apt/sources.list file:

    deb http://nginx.org/packages/debian/ codename nginx
    deb-src http://nginx.org/packages/debian/ codename nginx
    

    For Ubuntu replace codename with Ubuntu distribution codename, and append the following to the end of the /etc/apt/sources.list file:

    deb http://nginx.org/packages/ubuntu/ codename nginx
    deb-src http://nginx.org/packages/ubuntu/ codename nginx
    

    For Debian/Ubuntu then run the following commands:

    apt-get update
    apt-get install nginx
    

    For SLES run the following command:

    zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/12' nginx
    

    reply
    0
  • Cancelreply