{"id":5336,"date":"2023-05-17T17:28:05","date_gmt":"2023-05-17T09:28:05","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=5336"},"modified":"2023-05-17T17:28:05","modified_gmt":"2023-05-17T09:28:05","slug":"ssl%e8%af%81%e4%b9%a6%e5%85%8d%e8%b4%b9%e7%89%88%e6%9c%ac%e7%9a%84%e6%80%8e%e4%b9%88%e7%94%b3%e8%af%b7%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/https\/5336.html","title":{"rendered":"ssl\u8bc1\u4e66\u514d\u8d39\u7248\u672c\u7684\u600e\u4e48\u7533\u8bf7\uff1f"},"content":{"rendered":"<p>SSL\u8bc1\u4e66\u662f\u4e00\u79cd\u7528\u4e8e\u4fdd\u62a4\u6570\u636e\u4f20\u8f93\u5b89\u5168\u7684\u52a0\u5bc6\u6280\u672f\uff0c\u5b83\u80fd\u591f\u5728\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u5efa\u7acb\u4e00\u4e2a\u5b89\u5168\u7684\u901a\u8baf\u4fe1\u9053\uff0c\u4fdd\u62a4\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u673a\u5bc6\u6027\u3001\u5b8c\u6574\u6027\u548c\u53ef\u4fe1\u6027\u3002SSL\u8bc1\u4e66\u5206\u4e3a\u6536\u8d39\u7248\u672c\u548c\u514d\u8d39\u7248\u672c\uff0c\u672c\u7bc7\u6587\u7ae0\u5c06\u4ecb\u7ecd\u5982\u4f55\u7533\u8bf7\u514d\u8d39\u7248\u672c\u7684SSL\u8bc1\u4e66\u3002<\/p>\n<p>\u4e00\u3001\u514d\u8d39SSL\u8bc1\u4e66\u7684\u539f\u7406<\/p>\n<p>\u514d\u8d39SSL\u8bc1\u4e66\u7684\u539f\u7406\u4e0e\u6536\u8d39\u7248\u672c\u7684SSL\u8bc1\u4e66\u7c7b\u4f3c\uff0c\u90fd\u662f\u57fa\u4e8e\u516c\u94a5\u52a0\u5bc6\u6280\u672f\u5b9e\u73b0\u7684\u3002\u5728\u5efa\u7acbSSL\u8fde\u63a5\u7684\u8fc7\u7a0b\u4e2d\uff0c\u670d\u52a1\u5668\u4f1a\u751f\u6210\u4e00\u5bf9\u5bc6\u94a5\uff0c\u4e00\u628a\u79c1\u94a5\u548c\u4e00\u628a\u516c\u94a5\u3002\u79c1\u94a5\u53ea\u6709\u670d\u52a1\u5668\u62e5\u6709\uff0c\u7528\u4e8e\u89e3\u5bc6\u5ba2\u6237\u7aef\u53d1\u6765\u7684\u52a0\u5bc6\u6570\u636e\uff1b\u516c\u94a5\u5219\u88ab\u670d\u52a1\u5668\u53d1\u9001\u7ed9\u5ba2\u6237\u7aef\uff0c\u7528\u4e8e\u52a0\u5bc6\u5ba2\u6237\u7aef\u53d1\u9001\u7ed9\u670d\u52a1\u5668\u7684\u6570\u636e\u3002<\/p>\n<p>\u5ba2\u6237\u7aef\u5728\u6536\u5230\u670d\u52a1\u5668\u7684\u516c\u94a5\u540e\uff0c\u4f1a\u901a\u8fc7CA\u673a\u6784\uff08\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff09\u6765\u9a8c\u8bc1\u670d\u52a1\u5668\u7684\u8eab\u4efd\u548c\u516c\u94a5\u7684\u6709\u6548\u6027\u3002\u5982\u679c\u9a8c\u8bc1\u901a\u8fc7\uff0c\u5ba2\u6237\u7aef\u4f1a\u751f\u6210\u4e00\u4e2a\u4f1a\u8bdd\u5bc6\u94a5\uff08Session Key\uff09\uff0c\u7528\u4e8e\u52a0\u5bc6\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u6570\u636e\uff0c\u4fdd\u8bc1\u6570\u636e\u7684\u673a\u5bc6\u6027\u548c\u5b8c\u6574\u6027\u3002<\/p>\n<p>\u4e8c\u3001\u514d\u8d39SSL\u8bc1\u4e66\u7684\u7533\u8bf7\u6d41\u7a0b<\/p>\n<p>1. \u9009\u62e9\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff09<\/p>\n<p>\u76ee\u524d\u5e02\u9762\u4e0a\u6709\u5f88\u591a\u514d\u8d39\u7684SSL\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff0c\u5982Let&#8217;s Encrypt\u3001Comodo\u3001StartSSL\u7b49\u3002\u5176\u4e2d\uff0cLet&#8217;s Encrypt\u662f\u6700\u4e3a\u6d41\u884c\u7684\u514d\u8d39SSL\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff0c\u672c\u6587\u4ee5Let&#8217;s Encrypt\u4e3a\u4f8b\u8fdb\u884c\u4ecb\u7ecd\u3002<\/p>\n<p>2. \u5b89\u88c5Certbot<\/p>\n<p>Certbot\u662f\u4e00\u4e2a\u81ea\u52a8\u5316SSL\u8bc1\u4e66\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u81ea\u52a8\u7533\u8bf7\u3001\u5b89\u88c5\u548c\u66f4\u65b0SSL\u8bc1\u4e66\u3002\u5728\u7533\u8bf7Let&#8217;s Encrypt\u514d\u8d39SSL\u8bc1\u4e66\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5Certbot\u3002<\/p>\n<p>Certbot\u652f\u6301\u5404\u79cd\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u548cWeb\u670d\u52a1\u5668\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u670d\u52a1\u5668\u73af\u5883\u9009\u62e9\u5bf9\u5e94\u7684\u5b89\u88c5\u65b9\u5f0f\u3002\u5177\u4f53\u5b89\u88c5\u6b65\u9aa4\u53ef\u4ee5\u53c2\u8003Certbot\u5b98\u65b9\u7f51\u7ad9\u7684\u6587\u6863\u3002<\/p>\n<p>3. \u7533\u8bf7SSL\u8bc1\u4e66<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210Certbot\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u7533\u8bf7SSL\u8bc1\u4e66\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>sudo certbot certonly &#8211;manual -d yourdomain.com<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0cyourdomain.com\u662f\u9700\u8981\u7533\u8bf7SSL\u8bc1\u4e66\u7684\u57df\u540d\u3002\u6267\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0cCertbot\u4f1a\u63d0\u793a\u7528\u6237\u8fdb\u884c\u57df\u540d\u9a8c\u8bc1\uff0c\u5177\u4f53\u9a8c\u8bc1\u65b9\u5f0f\u53ef\u4ee5\u6839\u636eCertbot\u7684\u63d0\u793a\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<p>4. \u5b89\u88c5SSL\u8bc1\u4e66<\/p>\n<p>\u7533\u8bf7SSL\u8bc1\u4e66\u6210\u529f\u540e\uff0cCertbot\u4f1a\u5c06\u8bc1\u4e66\u548c\u79c1\u94a5\u4fdd\u5b58\u5728\u670d\u52a1\u5668\u4e0a\u7684\u6307\u5b9a\u8def\u5f84\u4e0b\u3002\u7528\u6237\u9700\u8981\u5c06\u8bc1\u4e66\u548c\u79c1\u94a5\u914d\u7f6e\u5230Web\u670d\u52a1\u5668\u4e2d\uff0c\u4ee5\u542f\u7528SSL\u52a0\u5bc6\u3002<\/p>\n<p>\u5177\u4f53\u914d\u7f6e\u65b9\u5f0f\u53ef\u4ee5\u53c2\u8003Web\u670d\u52a1\u5668\u7684\u6587\u6863\u3002\u4ee5Nginx\u4e3a\u4f8b\uff0c\u53ef\u4ee5\u5c06\u8bc1\u4e66\u548c\u79c1\u94a5\u914d\u7f6e\u5230Nginx\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>server {<\/p>\n<p>    listen 443 ssl;<\/p>\n<p>    server_name yourdomain.com;<\/p>\n<p>    ssl_certificate \/path\/to\/fullchain.pem;<\/p>\n<p>    ssl_certificate_key \/path\/to\/privkey.pem;<\/p>\n<p>    &#8230;<\/p>\n<p>}<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0c\/path\/to\/fullchain.pem\u548c\/path\/to\/privkey.pem\u5206\u522b\u662f\u8bc1\u4e66\u548c\u79c1\u94a5\u7684\u8def\u5f84\u3002<\/p>\n<p>\u4e09\u3001\u514d\u8d39SSL\u8bc1\u4e66\u7684\u4f18\u7f3a\u70b9<\/p>\n<p>\u514d\u8d39SSL\u8bc1\u4e66\u7684\u4f18\u70b9\u5728\u4e8e\u514d\u8d39\u3001\u5feb\u901f\u548c\u6613\u4e8e\u4f7f\u7528\uff0c\u80fd\u591f\u4e3a\u7528\u6237\u63d0\u4f9b\u57fa\u672c\u7684\u6570\u636e\u4f20\u8f93\u5b89\u5168\u4fdd\u969c\u3002\u540c\u65f6\uff0c\u514d\u8d39SSL\u8bc1\u4e66\u4e5f\u80fd\u591f\u901a\u8fc7CA\u673a\u6784\u7684\u9a8c\u8bc1\uff0c\u4fdd\u8bc1\u4e86\u8bc1\u4e66\u7684\u53ef\u4fe1\u5ea6\u548c\u6709\u6548\u6027\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u514d\u8d39SSL\u8bc1\u4e66\u4e5f\u6709\u4e00\u4e9b\u7f3a\u70b9\u3002\u9996\u5148\uff0c\u514d\u8d39SSL\u8bc1\u4e66\u53ea\u80fd\u63d0\u4f9b\u57fa\u672c\u7684\u52a0\u5bc6\u4fdd\u969c\uff0c\u65e0\u6cd5\u6ee1\u8db3\u66f4\u9ad8\u7ea7\u7684\u5b89\u5168\u9700\u6c42\u3002\u5176\u6b21\uff0c\u514d\u8d39SSL\u8bc1\u4e66\u7684\u6709\u6548\u671f\u8f83\u77ed\uff0c\u9700\u8981\u5b9a\u671f\u66f4\u65b0\u3002\u6700\u540e\uff0c\u514d\u8d39SSL\u8bc1\u4e66\u7684\u7533\u8bf7\u548c\u7ba1\u7406\u8fc7\u7a0b\u8f83\u4e3a\u7e41<a href=\"https:\/\/www.yimenssl.cn\/ssl-shenqing-1968.html\">ssl\u8bc1\u4e66\u548b\u6837\u7533\u8bf7<\/a>\u7410\uff0c\u9700\u8981\u4e00\u5b9a\u7684\u6280\u672f\u80fd\u529b\u3002<\/p>\n<p>\u7efc\u4e0a\u6240\u8ff0\uff0c\u5bf9\u4e8e\u4e2a\u4eba\u548c\u5c0f\u578b\u7f51\u7ad9\u6765\u8bf4\uff0c\u514d\u8d39SSL\u8bc1\u4e66\u662f\u4e00\u79cd\u4e0d\u9519\u7684\u9009\u62e9\u3002\u4f46\u5bf9\u4e8e\u5927\u578b\u4f01\u4e1a\u548c\u9ad8\u5b89\u5168\u8981\u6c42\u7684\u7f51\u7ad9\u6765\u8bf4\uff0c\u5efa\u8bae\u4f7f\u7528\u6536\u8d39\u7248\u672c\u7684SSL\u8bc1\u4e66\uff0c\u4ee5\u83b7\u5f97\u66f4\u9ad8\u7ea7\u7684\u5b89\u5168\u4fdd\u969c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSL\u8bc1\u4e66\u662f\u4e00\u79cd\u7528\u4e8e\u4fdd\u62a4\u6570\u636e\u4f20\u8f93\u5b89\u5168\u7684\u52a0\u5bc6\u6280\u672f\uff0c\u5b83\u80fd\u591f\u5728\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u5efa\u7acb\u4e00\u4e2a\u5b89\u5168\u7684\u901a\u8baf\u4fe1\u9053\uff0c\u4fdd\u62a4\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u673a\u5bc6\u6027\u3001\u5b8c\u6574\u6027\u548c\u53ef\u4fe1\u6027\u3002SSL\u8bc1\u4e66\u5206\u4e3a\u6536\u8d39\u7248\u672c\u548c\u514d\u8d39\u7248\u672c\uff0c\u672c\u7bc7\u6587\u7ae0\u5c06\u4ecb\u7ecd\u5982\u4f55\u7533\u8bf7<\/p>\n","protected":false},"author":26,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2145],"tags":[7561,6810,1059,1024,754],"class_list":{"0":"post-5336","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-https","7":"tag-https","9":"tag-1059","10":"tag-1024","11":"tag-754"},"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/5336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=5336"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/5336\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=5336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=5336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=5336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}