https\u57df\u540d\u8ba4\u8bc1<\/a>s Encrypt\u662f\u4e00\u4e2a\u975e\u8425\u5229\u6027\u673a\u6784\uff0c\u65e8\u5728\u63d0\u4f9b\u514d\u8d39\u7684SSL\u8bc1\u4e66\uff0c\u4ee5\u52a0\u5f3a\u7f51\u7edc\u5b89\u5168\u3002\u5728\u63a5\u4e0b\u6765\u7684\u4ecb\u7ecd\u4e2d\uff0c\u4ee5Let\u2019s Encrypt\u4e3a\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002<\/p>\n\u4e09\u3001\u6279\u91cf\u7533\u8bf7\u514d\u8d39SSL\u8bc1\u4e66<\/p>\n
1. \u5b89\u88c5Certbot<\/p>\n
Certbot\u662f\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u7528\u4e8e\u81ea\u52a8\u5316\u7533\u8bf7\u3001\u5b89\u88c5\u548c\u66f4\u65b0SSL\u8bc1\u4e66\u3002\u53ef\u4ee5\u4eceCertbot\u5b98\u7f51\uff08https:\/\/certbot.eff.org\/instructions\uff09\u4e0b\u8f7d\u5bf9\u5e94\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n
2. \u7533\u8bf7SSL\u8bc1\u4e66<\/p>\n
Certbot\u652f\u6301\u591a\u79cd\u9a8c\u8bc1\u65b9\u5f0f\uff0c\u5305\u62ecHTTP\u3001DNS\u3001TLS-SNI\u7b49\u3002\u5176\u4e2dHTTP\u9a8c\u8bc1\u662f\u6700\u5e38\u7528\u7684\u65b9\u5f0f\uff0c\u4e5f\u662f\u672c\u6587\u4ecb\u7ecd\u7684\u65b9\u5f0f\u3002HTTP\u9a8c\u8bc1\u9700\u8981\u5728\u7f51\u7ad9\u4e0a\u6dfb\u52a0\u4e00\u4e2a\u7279\u5b9a\u7684\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7HTTP\u8bbf\u95ee\u9a8c\u8bc1\u3002\u5047\u8bbe\u6709\u4e00\u4e2a\u57df\u540d\u5217\u8868domains.txt\uff0c\u5176\u4e2d\u5305\u542b\u9700\u8981\u7533\u8bf7SSL\u8bc1\u4e66\u7684\u57df\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u6279\u91cf\u7533\u8bf7\uff1a<\/p>\n
“`<\/p>\n
cat domains.txt | xargs -I {} certbot certonly –webroot -w \/var\/www\/html -d {}<\/p>\n
“`<\/p>\n
\u5176\u4e2d\uff0c-w\u53c2\u6570\u6307\u5b9a\u7f51\u7ad9\u6839\u76ee\u5f55\u7684\u8def\u5f84\uff0c-d\u53c2\u6570\u6307\u5b9a\u9700\u8981\u7533\u8bf7\u8bc1\u4e66\u7684\u57df\u540d\u3002<\/p>\n
3. \u81ea\u52a8\u66f4\u65b0\u8bc1\u4e66<\/p>\n
Let\u2019s Encrypt\u8bc1\u4e66\u7684\u6709\u6548\u671f\u4e3a90\u5929\uff0c\u9700\u8981\u5b9a\u671f\u66f4\u65b0\u3002Certbot\u63d0\u4f9b\u4e86\u81ea\u52a8\u66f4\u65b0\u8bc1\u4e66\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u8bbe\u7f6e\uff1a<\/p>\n
“`<\/p>\n
certbot renew –dry-run<\/p>\n
“`<\/p>\n
\u8be5\u547d\u4ee4\u4f1a\u5728\u8bc1\u4e66\u8fc7\u671f\u524d30\u5929\u81ea\u52a8\u66f4\u65b0\u8bc1\u4e66\uff0c–dry-run\u53c2\u6570\u8868\u793a\u6d4b\u8bd5\u8fd0\u884c\uff0c\u53ef\u4ee5\u5728\u4e0d\u5b9e\u9645\u66f4\u65b0\u8bc1\u4e66\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n
\u56db\u3001\u603b\u7ed3<\/p>\n
\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u6279\u91cf\u7533\u8bf7\u514d\u8d39\u7684SSL\u8bc1\u4e66\uff0c\u4ee5\u63d0\u9ad8\u7f51\u7ad9\u7684\u5b89\u5168\u6027\u548c\u53ef\u4fe1\u5ea6\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u514d\u8d39\u8bc1\u4e66\u7684\u5b89\u5168\u6027\u548c\u4fe1\u4efb\u5ea6\u53ef\u80fd\u4e0d\u5982\u4ed8\u8d39\u8bc1\u4e66\uff0c\u56e0\u6b64\u5bf9\u4e8e\u9700\u8981\u66f4\u9ad8\u7ea7\u522b\u4fdd\u62a4\u7684\u7f51\u7ad9\uff0c\u5efa\u8bae\u4f7f\u7528\u4ed8\u8d39\u8bc1\u4e66\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u968f\u7740\u7f51\u7edc\u5b89\u5168\u610f\u8bc6\u7684\u63d0\u9ad8\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u7f51\u7ad9\u5f00\u59cb\u4f7f\u7528SSL\u8bc1\u4e66\u52a0\u5bc6\u4f20\u8f93\u6570\u636e\uff0c\u4ee5\u4fdd\u62a4\u7528\u6237\u9690\u79c1\u548c\u5b89\u5168\u3002\u4f46\u662f\uff0c\u8d2d\u4e70SSL\u8bc1\u4e66\u9700\u8981\u4e00\u5b9a\u7684\u8d39\u7528\uff0c\u5bf9\u4e8e\u5c0f\u578b\u7f51\u7ad9\u6216\u4e2a\u4eba\u535a\u5ba2\u6765\u8bf4\u53ef\u80fd\u6709\u4e9b\u8d1f\u62c5\u3002\u56e0\u6b64\uff0c\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u6279\u91cf\u7533\u8bf7\u514d<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[18672,5215,247,18671,30],"topic":[],"class_list":["post-14322","post","type-post","status-publish","format-standard","hentry","category-sqssl","tag-https","tag-5215","tag-247","tag--https-","tag-30"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/14322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=14322"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/14322\/revisions"}],"predecessor-version":[{"id":14343,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/14322\/revisions\/14343"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=14322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=14322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=14322"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=14322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}