{"id":13407,"date":"2024-09-27T14:17:54","date_gmt":"2024-09-27T06:17:54","guid":{"rendered":"http:\/\/999.zuizhuai.cn\/?p=13407"},"modified":"2024-09-27T14:17:54","modified_gmt":"2024-09-27T06:17:54","slug":"%e5%a6%82%e4%bd%95%e7%94%9f%e6%88%90%e5%85%8d%e8%b4%b9%e7%9a%84https%e8%af%81%e4%b9%a6","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=13407","title":{"rendered":"\u5982\u4f55\u751f\u6210\u514d\u8d39\u7684HTTPS\u8bc1\u4e66"},"content":{"rendered":"<p style=\"margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\u751f\u6210\u514d\u8d39\u7684HTTPS\u8bc1\u4e66\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4f9b\u9009\u62e9\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u5927\u591a\u4f9d\u8d56\u4e8e\u4e0d\u540c\u7684\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff09\u63d0\u4f9b\u7684\u514d\u8d39\u670d\u52a1\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5\u6765\u751f\u6210\u514d\u8d39\u7684HTTPS\u8bc1\u4e66\uff1a<\/p>\n<h3 style=\"margin-top: 14px; margin-bottom: 8px; font-weight: 600; font-size: 20px; line-height: 1.7; letter-spacing: normal; text-align: start; border: initial none initial;\">1. \u4f7f\u7528Let&#8217;s Encrypt<\/h3>\n<p style=\"margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">Let&#8217;s Encrypt\u662f\u4e00\u4e2a\u7531Internet Security Research Group (ISRG) \u8fd0\u8425\u7684\u5f00\u6e90\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff0c\u63d0\u4f9b\u514d\u8d39\u7684SSL\/TLS\u8bc1\u4e66\u3002\u901a\u8fc7\u5176\u5b98\u65b9\u63a8\u8350\u7684\u5ba2\u6237\u7aefCertbot\uff0c\u53ef\u4ee5\u81ea\u52a8\u5316\u5730\u83b7\u53d6\u548c\u66f4\u65b0\u8bc1\u4e66\u3002<\/p>\n<p style=\"margin-top: 14px; margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\"><span style=\"font-weight: 600;\">\u6b65\u9aa4\u5982\u4e0b<\/span>\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-bottom: 1em; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\n<li style=\"font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u5b89\u88c5Certbot<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u6839\u636e\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u9009\u62e9\u5408\u9002\u7684\u5b89\u88c5\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u5728Debian\u6216Ubuntu\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528<code style=\"padding: 1px 4px; margin-right: 2px; margin-left: 2px; , menlo, courier, monospace;font-size: 12.75px; border-radius: 3px;\">sudo apt-get update &amp;&amp; sudo apt-get install certbot<\/code>\u547d\u4ee4\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u83b7\u53d6\u8bc1\u4e66<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u4f7f\u7528Certbot\u7684\u547d\u4ee4\u6765\u8bf7\u6c42\u8bc1\u4e66\u3002\u6709\u591a\u79cd\u9a8c\u8bc1\u57df\u540d\u7684\u65b9\u6cd5\uff0c\u5982\u4f7f\u7528Webroot\u63d2\u4ef6\u3001Standalone\u6a21\u5f0f\u6216Manual\u6a21\u5f0f\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Standalone\u6a21\u5f0f\u5e76\u6307\u5b9a\u57df\u540d\uff1a<code style=\"padding: 1px 4px; margin-right: 2px; margin-left: 2px; , menlo, courier, monospace;font-size: 12.75px; border-radius: 3px;\">sudo certbot certonly --standalone -d yourdomain.com<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u914d\u7f6eWeb\u670d\u52a1\u5668<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u6309\u7167Certbot\u7684\u63d0\u793a\uff0c\u5c06\u751f\u6210\u7684\u8bc1\u4e66\u914d\u7f6e\u5230\u4f60\u7684Web\u670d\u52a1\u5668\u4e0a\uff0c\u5982Nginx\u6216Apache\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 style=\"margin-top: 14px; margin-bottom: 8px; font-weight: 600; font-size: 20px; line-height: 1.7; letter-spacing: normal; text-align: start; border: initial none initial;\">2. \u4f7f\u7528Cloudflare<\/h3>\n<p style=\"margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">Cloudflare\u4e0d\u4ec5\u63d0\u4f9bCDN\u670d\u52a1\uff0c\u8fd8\u63d0\u4f9b\u514d\u8d39\u7684SSL\/TLS\u8bc1\u4e66\u3002\u5982\u679c\u4f60\u7684\u57df\u540d\u89e3\u6790\u5728Cloudflare\u4e0a\uff0c\u53ef\u4ee5\u8f7b\u677e\u542f\u7528HTTPS\u3002<\/p>\n<p style=\"margin-top: 14px; margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\"><span style=\"font-weight: 600;\">\u6b65\u9aa4\u5982\u4e0b<\/span>\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-bottom: 1em; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\n<li style=\"font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u6ce8\u518cCloudflare\u8d26\u6237<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u8bbf\u95eeCloudflare\u5b98\u7f51\uff0c\u6ce8\u518c\u5e76\u767b\u5f55\u8d26\u6237\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u6dfb\u52a0\u4f60\u7684\u7f51\u7ad9<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u5c06\u4f60\u7684\u57df\u540d\u6dfb\u52a0\u5230Cloudflare\uff0c\u5e76\u66f4\u65b0DNS\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u542f\u7528HTTPS<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u5728Cloudflare\u7684\u4eea\u8868\u677f\u4e2d\uff0c\u542f\u7528\u201cAlways Use HTTPS\u201d\u548c\u201cAutomatic HTTPS Rewrites\u201d\u9009\u9879\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 style=\"margin-top: 14px; margin-bottom: 8px; font-weight: 600; font-size: 20px; line-height: 1.7; letter-spacing: normal; text-align: start; border: initial none initial;\">3. \u4f7f\u7528ZeroSSL<\/h3>\n<p style=\"margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">ZeroSSL\u662f\u4e00\u4e2a\u63d0\u4f9b\u514d\u8d39\u548c\u4ed8\u8d39SSL\u8bc1\u4e66\u670d\u52a1\u7684\u7f51\u7ad9\uff0c\u4f7f\u7528ACME\u534f\u8bae\uff0c\u754c\u9762\u53cb\u597d\u3002<\/p>\n<p style=\"margin-top: 14px; margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\"><span style=\"font-weight: 600;\">\u6b65\u9aa4\u5982\u4e0b<\/span>\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-bottom: 1em; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\n<li style=\"font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u6ce8\u518c\u8d26\u6237<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u8bbf\u95eeZeroSSL\u5b98\u7f51\uff0c\u6ce8\u518c\u4e00\u4e2a\u65b0\u8d26\u6237\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u751f\u6210\u8bc1\u4e66<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u5728\u4eea\u8868\u677f\u4e2d\u70b9\u51fb\u201cNew Certificate\u201d\uff0c\u6309\u7167\u6b65\u9aa4\u8f93\u5165\u57df\u540d\u4fe1\u606f\u5e76\u9009\u62e9\u9a8c\u8bc1\u65b9\u6cd5\uff08\u5982HTTP\u6587\u4ef6\u9a8c\u8bc1\u6216DNS\u8bb0\u5f55\u9a8c\u8bc1\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u4e0b\u8f7d\u8bc1\u4e66<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u9a8c\u8bc1\u901a\u8fc7\u540e\uff0c\u4e0b\u8f7d\u751f\u6210\u7684\u8bc1\u4e66\u6587\u4ef6\uff0c\u5305\u62ec\u8bc1\u4e66\u6587\u4ef6(.crt\u6216.pem)\u3001\u79c1\u94a5(.key)\u548c\u53ef\u80fd\u7684\u4e2d\u95f4\u8bc1\u4e66(.ca-bundle\u6216.pem)\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u914d\u7f6eWeb\u670d\u52a1\u5668<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u5c06\u4e0b\u8f7d\u7684\u8bc1\u4e66\u6587\u4ef6\u914d\u7f6e\u5230\u4f60\u7684Web\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 style=\"margin-top: 14px; margin-bottom: 8px; font-weight: 600; font-size: 20px; line-height: 1.7; letter-spacing: normal; text-align: start; border: initial none initial;\">4. \u4f7f\u7528SSL For Free<\/h3>\n<p style=\"margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">SSL For Free\u662f\u4e00\u4e2a\u57fa\u4e8eLet&#8217;s Encrypt\u63d0\u4f9b\u514d\u8d39SSL\u8bc1\u4e66\u7684\u7f51\u7ad9\uff0c\u63d0\u4f9b\u7b80\u5355\u7684\u754c\u9762\u6765\u751f\u6210\u548c\u4e0b\u8f7d\u8bc1\u4e66\u3002<\/p>\n<p style=\"margin-top: 14px; margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\"><span style=\"font-weight: 600;\">\u6b65\u9aa4\u5982\u4e0b<\/span>\uff1a<\/p>\n<ol class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-bottom: 1em; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\n<li style=\"font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u8bbf\u95eeSSL For Free<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u8bbf\u95eeSSL For Free\u7f51\u7ad9\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u8f93\u5165\u57df\u540d<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u8f93\u5165\u4f60\u8981\u83b7\u53d6\u8bc1\u4e66\u7684\u57df\u540d\uff0c\u5e76\u9009\u62e9\u9a8c\u8bc1\u65b9\u6cd5\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u9a8c\u8bc1\u5e76\u4e0b\u8f7d\u8bc1\u4e66<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u6309\u7167\u63d0\u793a\u8fdb\u884c\u9a8c\u8bc1\uff08\u5982HTTP\u6587\u4ef6\u9a8c\u8bc1\u6216DNS\u8bb0\u5f55\u9a8c\u8bc1\uff09\uff0c\u9a8c\u8bc1\u6210\u529f\u540e\u4e0b\u8f7d\u8bc1\u4e66\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<li style=\"margin-top: 6px; font-family: PingFang-SC-Regular; line-height: 1.7;\"><span style=\"font-weight: 600;\">\u914d\u7f6eWeb\u670d\u52a1\u5668<\/span>\uff1a\n<ul class=\"list-paddingleft-1\" style=\"padding-left: 30px; margin-top: 14px; margin-left: -10px; line-height: 1.7;\">\n<li style=\"line-height: 1.7;\">\u5c06\u4e0b\u8f7d\u7684\u8bc1\u4e66\u6587\u4ef6\u914d\u7f6e\u5230\u4f60\u7684Web\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3 style=\"margin-top: 14px; margin-bottom: 8px; font-weight: 600; font-size: 20px; line-height: 1.7; letter-spacing: normal; text-align: start; border: initial none initial;\">5. \u4f7f\u7528\u5176\u4ed6\u670d\u52a1\u63d0\u4f9b\u5546<\/h3>\n<p style=\"margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\u9664\u4e86\u4e0a\u8ff0\u65b9\u6cd5\u5916\uff0c\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u670d\u52a1\u63d0\u4f9b\u5546\u63d0\u4f9b\u514d\u8d39\u7684HTTPS\u8bc1\u4e66\uff0c\u5982\u963f\u91cc\u4e91\u3001\u534e\u4e3a\u4e91\u3001\u817e\u8baf\u4e91\u7b49\u3002\u8fd9\u4e9b\u670d\u52a1\u63d0\u4f9b\u5546\u901a\u5e38\u8981\u6c42\u4f60\u5728\u5176\u5e73\u53f0\u4e0a\u6ce8\u518c\u8d26\u6237\uff0c\u5e76\u6309\u7167\u5404\u81ea\u7684\u6d41\u7a0b\u7533\u8bf7\u8bc1\u4e66\u3002<\/p>\n<p style=\"margin-top: 14px; margin-bottom: 0px; font-size: 15px; line-height: 1.7; letter-spacing: normal; text-align: start;\">\u603b\u4e4b\uff0c\u751f\u6210\u514d\u8d39\u7684HTTPS\u8bc1\u4e66\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u548c\u504f\u597d\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u52a1\u5fc5\u786e\u4fdd\u5728\u751f\u6210\u548c\u914d\u7f6e\u8bc1\u4e66\u65f6\u9075\u5faa\u6700\u4f73\u5b9e\u8df5\uff0c\u4ee5\u786e\u4fdd\u7f51\u7ad9\u7684\u5b89\u5168\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u751f\u6210\u514d\u8d39\u7684HTTPS\u8bc1\u4e66\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4f9b\u9009\u62e9\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u5927\u591a\u4f9d\u8d56\u4e8e\u4e0d\u540c\u7684\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff09\u63d0\u4f9b\u7684\u514d\u8d39\u670d\u52a1\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5\u6765\u751f\u6210\u514d\u8d39\u7684HTTPS\u8bc1\u4e66\uff1a 1. \u4f7f\u7528Let&#8217;s Encrypt Let&#8217;s Encry&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140],"tags":[],"topic":[],"class_list":["post-13407","post","type-post","status-publish","format-standard","hentry","category-domain-website"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/13407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13407"}],"version-history":[{"count":0,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/13407\/revisions"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13407"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13407"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=13407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}