Introduction to SSL certificate installation and deployment steps under Nginx

Introduction to SSL certificate installation and deployment steps under Nginx

Problem description:

The editor encountered an expiration of the https protocol, so he reapplied and deployed the SSL certificate on the Nginx server

Installation Steps

1. Preparation

In the SSL Certificate Management Console, download and decompress the cloud.tencent.com certificate file package to a local directory.

After decompression, you can obtain the certificate file of the relevant type. It contains the Nginx folder and the CSR file:

Folder Name: Nginx

Folder Contents:

1_cloud.tencent.com_bundle.crt certificate file

2_cloud.tencent.com.key private key file

CSR file content: cloud.tencent.com.csr file

2. Remotely connect to the server

insert image description here

3. Copy the certificate and private key files

Copy the obtained 1_cloud.tencent.com_bundle.crt certificate file and 2_cloud.tencent.com.key private key file from the local directory to the /usr/local/nginx/conf directory of the Nginx server (this is the default installation directory of Nginx, please operate according to the actual situation).

I have these two.

4. Edit the conf/nginx.conf file in the Nginx root directory

The edited content is as follows:

// Edit content server {
        #SSL access port number is 443
        listen 443 ssl; 
        #Fill in the domain name of the bound certificate server_name cloud.tencent.com; //Fill in the certificate domain name here#Certificate file name ssl_certificate 1_cloud.tencent.com_bundle.crt; //Fill in the name of the certificate file just copied here#Private key file name ssl_certificate_key 2_cloud.tencent.com.key; //Fill in the name of the private key file just copied here ssl_session_timeout 5m;
        #Please configure ssl_protocols according to the following protocols TLSv1 TLSv1.1 TLSv1.2; 
        #Please configure the encryption suite according to the following suite configuration, and the writing method follows the openssl standard.
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; 
        ssl_prefer_server_ciphers on;
        location / {
           #Website homepage path. This path is for reference only. Please follow the actual directory for specific operations.
           #For example, if your website's running directory is in /etc/www, fill in /etc/www.
            root html; 
            index index.html index.htm;
        }
    }

5. In the Nginx root directory, verify the configuration file problem by executing the following command

//In the nginx root directory, enter nginx -t in cmd

After input, the question will be displayed. If there is a problem, modify it according to the problem. If not, proceed to the next step

6. Restart Nginx and access the website

// Restart Nginx
nginx -s stop
start nginx

This is the end of this article about the steps to install and deploy SSL certificates under Nginx. For more information about Nginx deployment of SSL certificates, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Example of how to configure nginx to implement SSL
  • Solution to Nginx SSL certificate configuration error
  • Nginx domain name SSL certificate configuration (website http upgraded to https)
  • Nginx configuration SSL and WSS steps introduction

<<:  HTML Basics Must-Read---Detailed Explanation of Forms, Image Hotspots, Web Page Division and Splicing

>>:  Detailed explanation of the seven data types in JavaScript

Recommend

Use pure CSS to achieve scroll shadow effect

To get straight to the point, there is a very com...

How to mount a disk in Linux

When using a virtual machine, you may find that t...

Useful codes for web page creation

<br />How can I remove the scroll bar on the...

Windows Server 2019 Install (Graphical Tutorial)

Windows Server 2019 is the latest server operatin...

Web lesson plans, lesson plans for beginners

Teaching Topics Web page Applicable grade Second ...

WeChat applet implements countdown for sending SMS verification code

This article shares the specific code for the WeC...

How to detect file system integrity based on AIDE in Linux

1. AIDE AIDE (Advanced Intrusion Detection Enviro...

Alibaba Cloud ESC Server Docker Deployment of Single Node Mysql

1. Download the accelerated version of msyql dock...

Example of using CSS3 to create Pikachu animated wallpaper

text OK, next it’s time to show the renderings. O...

Guide to using env in vue cli

Table of contents Preface Introduction-Official E...