{"id":23,"date":"2023-05-16T17:28:34","date_gmt":"2023-05-16T09:28:34","guid":{"rendered":"https:\/\/app.60day.cn\/appday\/?p=23"},"modified":"2023-05-16T17:28:34","modified_gmt":"2023-05-16T09:28:34","slug":"%e4%b8%ba%e5%9f%9f%e5%90%8d%e7%94%b3%e8%af%b7%e5%85%8d%e8%b4%b9ssl%e8%af%81%e4%b9%a6%e6%80%8e%e4%b9%88%e6%93%8d%e4%bd%9c%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.60day.cn\/appday\/https\/23\/","title":{"rendered":"\u4e3a\u57df\u540d\u7533\u8bf7\u514d\u8d39ssl\u8bc1\u4e66\u600e\u4e48\u64cd\u4f5c\uff1f"},"content":{"rendered":"<p>SSL\u8bc1\u4e66\u662f\u5bf9\u7f51\u7ad9\u8fdb\u884c\u52a0\u5bc6\u7684\u4e00\u79cd\u5b89\u5168\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u8ba9\u7528\u6237\u7684\u6d4f\u89c8\u5668\u548c\u7f51\u7ad9\u4e4b\u95f4\u5efa\u7acb\u4e00\u6761\u52a0\u5bc6\u7684\u901a\u9053\uff0c\u786e\u4fdd\u7528\u6237\u5728\u6d4f\u89c8\u7f51\u7ad9\u65f6\u7684\u6570\u636e\u5b89\u5168\u3002\u4f20\u7edf\u4e0a\uff0c\u83b7\u5f97SSL\u8bc1\u4e66\u9700\u8981\u82b1\u8d39\u4e00\u5b9a\u7684\u8d39\u7528\uff0c\u4f46\u662f\u73b0\u5728\u6709\u4e00\u4e9b\u673a\u6784\u63d0\u4f9b\u4e86\u514d\u8d39\u7684SSL\u8bc1\u4e66\uff0c\u53ef\u4ee5\u8ba9\u7f51\u7ad9\u535a\u4e3b\u8f7b\u677e\u5730\u4e3a\u81ea\u5df1\u7684\u7f51\u7ad9\u6dfb\u52a0\u5b89\u5168\u4fdd\u969c\u3002<\/p>\n<p>\u514d\u8d39SSL\u8bc1\u4e66\u7684\u539f\u7406\u662f\u5229\u7528\u4e86\u4e00\u4e2a\u7531\u975e\u8425\u5229\u6027\u7ec4\u7ec7 Let&#8217;s Encrypt \u53d1\u8d77\u7684\u8ba1\u5212\uff0c\u8be5\u8ba1\u5212\u65e8\u5728\u4e3a\u6240\u6709\u4eba\u63d0\u4f9b\u514d\u8d39\u7684SSL\u8bc1\u4e66\uff0c\u8ba9\u66f4\u591a\u7684\u7f51\u7ad9\u53ef\u4ee5\u4f7f\u7528HTTPS\u534f\u8bae\u8fdb\u884c\u52a0\u5bc6\u4f20\u8f93\u3002Let&#8217;s Encrypt \u8fd0\u884c\u4e86\u4e00\u4e2a\u81ea\u52a8\u5316\u7684\u8bc1\u4e66\u7ba1\u7406\u5e73\u53f0\uff0c\u53ef\u4ee5\u4e3a\u7f51\u7ad9\u81ea\u52a8\u9881\u53d1\u548c\u66f4\u65b0SSL\u8bc1\u4e66\u3002<\/p>\n<p>\u8981\u7533\u8bf7\u514d\u8d39SSL\u8bc1\u4e66\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u7f51\u7ad9\u7684\u57df\u540d\u5df2\u7ecf\u89e3\u6790\u5230\u4e86\u670d\u52a1\u5668\u3002\u7136\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528 Let&#8217;s Encrypt \u63d0\u4f9b\u7684 Certbot<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/ag\/35\/377196.jpg\" \/><\/figure>\n<\/p>\n<p> \u5de5\u5177\u6765\u81ea\u52a8\u7533\u8bf7\u548c\u5b89\u88c5SSL\u8bc1\u4e66\u3002<\/p>\n<p>\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>1. \u5b89\u88c5 Certbot \u5de5\u5177<\/p>\n<p>Certbot \u5de5\u5177\u53ef\u4ee5\u81ea\u52a8\u5316\u5730\u7533\u8bf7\u548c\u5b89\u88c5SSL\u8bc1\u4e66\uff0c\u652f\u6301\u591a\u79cd\u64cd\u4f5c\u7cfb\u7edf\u3002\u53ef\u4ee5\u5728 Certbot \u5b98\u7f51\u627e\u5230\u5bf9\u5e94\u7684\u5b89\u88c5\u6307\u5357\uff0c\u6839\u636e\u81ea\u5df1\u7684\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<p>2. \u786e\u8ba4\u7f51\u7ad9\u80fd\u591f\u901a\u8fc7 HTTPS \u8bbf\u95ee<\/p>\n<p>\u5728\u7533\u8bf7\u8bc1\u4e66\u4e4b\u524d\uff0c\u9700\u8981\u786e\u4fdd\u7f51\u7ad9\u5df2\u7ecf\u80fd\u591f\u901a\u8fc7 HTTPS \u8bbf\u95ee\u3002\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165 https:\/\/your-domain.com \u6765\u6d4b\u8bd5\u662f\u5426\u80fd\u591f\u6b63\u5e38\u8bbf\u95ee\u3002\u5982\u679c\u65e0\u6cd5\u8bbf\u95ee\uff0c\u9700\u8981\u68c0\u67e5\u670d\u52a1\u5668\u4e0a\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86 SSL \u8bc1\u4e66\u3002<\/p>\n<p>3. \u8fd0\u884c Certbot \u5de5\u5177<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210 Certbot \u5de5\u5177\u4e4b\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u7533\u8bf7 SSL \u8bc1\u4e66\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>sudo certbot certonly &#8211;web<a href=\"https:\/\/www.yimenssl.cn\/ssl-shenqing-1202.html\">ip ssl\u514d\u8d39\u7533\u8bf7<\/a>root -w \/var\/www\/your-domain.com -d your-domain.com -d www.your-domain.com<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0c`\/var\/www\/your-domain.com` \u662f\u7f51\u7ad9\u7684\u6839\u76ee\u5f55\uff0c`your-domain.com` \u548c `www.your-domain.com` \u662f\u8981\u7533\u8bf7\u8bc1\u4e66\u7684\u57df\u540d\u3002<\/p>\n<p>4. \u5b89\u88c5 SSL \u8bc1\u4e66<\/p>\n<p>\u7533\u8bf7\u5b8c\u8bc1\u4e66\u4e4b\u540e\uff0cCertbot \u5de5\u5177\u4f1a\u5c06\u8bc1\u4e66\u4fdd\u5b58\u5728 `\/etc\/letsencrypt\/live\/your-domain.com` \u76ee\u5f55\u4e0b\u3002\u53ef\u4ee5\u5728\u7f51\u7ad9\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u5f15\u7528\u8be5\u76ee\u5f55\u4e0b\u7684\u8bc1\u4e66\u6587\u4ef6\u6765\u542f\u7528 SSL \u52a0\u5bc6\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7533\u8bf7\u514d\u8d39 SSL \u8bc1\u4e66\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u514d\u8d39 SSL \u8bc1\u4e66\u7684\u6709\u6548\u671f\u53ea\u6709\u4e09\u4e2a\u6708\uff0c\u9700\u8981\u5b9a\u671f\u66f4\u65b0\u3002\u4f46\u662f Certbot \u5de5\u5177\u53ef\u4ee5\u81ea\u52a8\u5316\u5730\u5b8c\u6210\u8bc1\u4e66\u7684\u66f4\u65b0\uff0c\u8ba9\u7f51\u7ad9\u535a\u4e3b\u4e0d\u5fc5\u624b\u52a8\u64cd\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSL\u8bc1\u4e66\u662f\u5bf9\u7f51\u7ad9\u8fdb\u884c\u52a0\u5bc6\u7684\u4e00\u79cd\u5b89\u5168\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u8ba9\u7528\u6237\u7684\u6d4f\u89c8\u5668\u548c\u7f51\u7ad9\u4e4b\u95f4\u5efa\u7acb\u4e00\u6761\u52a0\u5bc6\u7684\u901a\u9053\uff0c\u786e\u4fdd\u7528\u6237\u5728\u6d4f\u89c8\u7f51\u7ad9\u65f6\u7684\u6570\u636e\u5b89\u5168\u3002\u4f20\u7edf\u4e0a\uff0c\u83b7\u5f97SSL\u8bc1\u4e66\u9700\u8981\u82b1\u8d39\u4e00\u5b9a\u7684\u8d39\u7528\uff0c\u4f46\u662f\u73b0\u5728\u6709\u4e00\u4e9b\u673a\u6784\u63d0\u4f9b\u4e86\u514d\u8d39\u7684S<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[23,24,22,21,16],"topic":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-https","tag-https-","tag-24","tag-22","tag-https","tag-16"],"_links":{"self":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":0,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/tags?post=23"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/topic?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}