Nginx source installation and subsequent upgrade HTTPS

Source: Internet
Author: User
Tags install openssl

The source of the matter is, the company to the website from HTTP to HTTPS, due to historical reasons, only found that the existing nginx is installed through the source code, and does not install the SSL module, need to install the SLL module, this nginx is the company's most front-end agent, involving many departments, Because it has not been done before, it is good to be careful, the following is demonstrated on the virtual machine.

1, first install some of the following required packages

Yum install gcc-c++yum install pcre pcre-devel  yum install zlib zlib-devel  Yum Install OpenSSL OpenSSL--devel  

2, download Nginx source code

Wget-c https://

3, unzip, compile, install

TAR-ZXVF nginx-1.11. 4 . TAR.GZCD nginx-1.11. 4 . /Configuremakemake Install

4, after the installation is successful, it can be accessed in the browser, the default installation under/usr/local/nginx

5, due to the default installation, we use the command to view the modules contained in Nginx, and no SSL module

/usr/local/nginx/sbin/nginx-v

--------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- ----------------------

6, here's how to install some modules after this happens, such as the SSL module

7, enter the source package, re-execute the previous module, note must not do make install, otherwise it will cover the

CD nginx-1.11. 4 . /configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_modulemake

8, install the module, after compiling, back up the previous nginx, in case of a contingency, and then replace the compiled Nginx

Cp/usr/local/nginx/sbin/nginx  /usr/local/nginx/sbin/bak/nginxcp. /objs/nginx/usr/local/nginx/sbin/

9, now check the Nginx installed module

Success, over, if it is installed through the RPM package, as if the default is to include these modules, if through the source installation, and forget to install some modules, you can only follow up the installation of these modules, if you have a better way, hope to criticize.

Nginx source installation and subsequent upgrade HTTPS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.