Alibaba Cloud applies for and deploys a free SSL certificate

This article briefly introduces how to apply for and deploy an Alibaba Cloud free SSL certificate.

Apply for a certificate

Log in to the Alibaba Cloud console, select the SSL 证书(应用安全) service, select SSL 证书in the sidebar, select a free certificate, and click立即创建证书:

Untitled

证书申请in Newly Generated Certificate Entry

Fill in the certificate domain name you want to bind in the certificate application form. If your domain name is under the current account,自动DNS验证will appear in the domain name verification method. This article will continue to demonstrate in this way, click下一步.

Untitled

Untitled

Alibaba Cloud will automatically configure DNS information under your domain name, that is, 2 in the screenshot. After a few seconds, click验证. After verification is complete, click提交审核.

Wait for a while to see the状态showing已签发.

Untitled

deploy

Click下载on the right side of the certificate and select the corresponding server to download. The server I need to deploy is nginx .

Untitled

Get a zip package containing key and pem files:

Untitled

Upload these two files to the server, it is recommended to place them in the nginx installation directory, create a new cert folder, and create a new folder similar to example.com20220417 under cert, indicating when the pair of certificates were deployed, and the corresponding domain name , to avoid forgetting later operation and maintenance.

Modify the conf file of the corresponding domain name and add ssl_certificate and ssl_certificate_key fields:

 1
2
3
4
5
6
 server {
// omitted
ssl_certificate cert/example.com20220417/xxxx.pem;
ssl_certificate_key cert/example.com20220417/xxxx.key;
// omitted
}

service nginx reload restart nginx to complete the deployment.

This article is reprinted from: https://lvdawei.com/post/aliyun-deploy-ssl-cert/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment