Configuring SSL free certificate (let’s encrypt) with nginx in Windows Environment

Time:2021-3-4

Write first

Now, Baidu, Google, GitHub and other websites have all enabled HTTPS, which is like a “lock” to the website. What HTTPS does is encrypt the request, making it more secure for users. For itself, in addition to protecting the interests of users, it can also avoid its own traffic being hijacked. Google has defined HTTP as an unsafe website. In my opinion, HTTPS is the trend of the future.

  1. The deployment environment is winodws nginx
  2. Let’s encrypt is a foreign public free SSL project hosted by the Linux foundation and sponsored by Mozilla, Cisco, akami, identrust and eff!
  3. Let’s encrypt certificate is valid for three months and needs to be renewed every three months
  4. Using win acme tool to generate let’s encrypt certificate
  1. First, download the latest version of win acme from GitHubDownload win acmeI downloaded win-acme.v2.1.12.943.x86 pluggable.zip This version
  2. Download nginxDownload nginx
  3. Unzip the win acme package and open it wacs.exe , multi map warning!

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configuring SSL free certificate (let's encrypt) with nginx in Windows Environment

Configure nginx, open / conf/ nginx.conf

server {
    listen       443 ssl;
    server_ Name your domain name;

    ssl_certificate      D:/nginx-1.15.6/ssl/xxxxx-chain.pem;  
    ssl_certificate_key  D:/nginx-1.15.6/ssl/xxxxxx-key.pem;  

    ssl_session_timeout 5m;
    charset utf-8;

    location / {
        root  D:/index/;
        index index.html;
    }
}

Start nginx, visit domain name!

The validity period of the certificate is 90 days. It needs to be renewed before it expires. Study how to renew it and renew it automatically. It will be shared at that time

The same domain name, within the prescribed time to apply for a certificate is limited, see the official introductionApplication restrictions