{"id":5893,"date":"2026-10-08T17:55:01","date_gmt":"2026-10-08T09:55:01","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=5893"},"modified":"2026-10-08T17:55:01","modified_gmt":"2026-10-08T09:55:01","slug":"%e5%85%8d%e8%b4%b9%e8%af%81%e4%b9%a6%e8%a6%81%e5%8f%98%e5%a4%a9%ef%bc%9fcloudflare-%e7%94%b3%e8%af%b7-ca-%e8%b5%84%e8%b4%a8%ef%bc%8c%e5%86%8d%e8%a7%81-lets-encrypt","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=5893","title":{"rendered":"\u514d\u8d39\u8bc1\u4e66\u8981\u53d8\u5929\uff1fCloudflare \u7533\u8bf7 CA \u8d44\u8d28\uff0c\u518d\u89c1 Let&#8217;s Encrypt"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6211\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u4f7f\u7528\u7684\u662f Let&#8217;s Encrypt \u63d0\u4f9b\u7684\u514d\u8d39\u8bc1\u4e66\uff0c3 \u4e2a\u6708\u8fc7\u671f\u4e00\u6b21\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u524d\uff0c\u514d\u8d39\u8bc1\u4e66\u7684\u6709\u6548\u671f\u662f\u4e00\u5e74\uff0c\u4f46\u968f\u7740\u6280\u672f\u6d6a\u6f6e\u7684\u53d1\u5c55\uff0c\u73b0\u5728\u514d\u8d39\u8bc1\u4e66\u53ea\u6709 3 \u4e2a\u6708\u7684\u6709\u6548\u671f\u4e86\uff0c\u800c\u4e14\u672a\u6765\u6709\u6548\u671f\u4f1a\u7ee7\u7eed\u7f29\u77ed\u3002\u73b0\u5728\u6211\u7684\u7f51\u7ad9\uff0c\u5728\u6bcf\u6b21\u8fc7\u671f\u540e\uff0c\u6211\u90fd\u9700\u8981\u5728\u963f\u91cc\u4e91\u4e0a\u91cd\u65b0\u7533\u8bf7\u514d\u8d39\u8bc1\u4e66\uff0c\u91cd\u65b0\u90e8\u7f72\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ea\u6709\u4e00\u4e2a\u7f51\u7ad9\u7684\u8bdd\uff0c\u6bcf\u6b21\u66f4\u65b0\u5176\u5b9e\u4e5f\u633a\u9ebb\u70e6\u7684\uff0c\u4f46\u597d\u5728\u7f51\u7ad9\u5c11\uff0c\u4e5f\u80fd\u5e94\u4ed8\u3002\u76f4\u5230\u56fd\u5e86\u524d\u7684\u4e00\u4e2a\u661f\u671f\uff0c\u516c\u53f8\u91cc\u7684\u51e0\u4e2a\u8fd0\u7ef4\u540c\u4e8b\u8bf7\u4e86\u957f\u5047\uff0c\u5c31\u6709\u8fd0\u7ef4\u8ba9\u6211\u5e2e\u5fd9\u66ff\u6362\u4e00\u4e0b\u516c\u53f8\u5185\u7f51\u7684\u51e0\u4e2a\u901a\u914d\u7b26\u6cdb\u57df\u540d\u8bc1\u4e66\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u4e8e\u57df\u540d\u592a\u591a\u4e86\uff0c\u800c\u4e14\u7528\u7684\u90fd\u662f\u514d\u8d39\u8bc1\u4e66\uff0c\u6bcf 90 \u5929\u624b\u52a8\u7eed\u4e00\u6b21 Let&#8217;s Encrypt \u8bc1\u4e66\uff0c\u592a\u7e41\u7410\u4e86\uff0c\u4e8e\u662f\u6211\u5c31\u7528 acme.sh \u81ea\u52a8\u5316\u7ed9\u89e3\u51b3\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u65f6\uff0c\u6211\u4e5f\u627e\u4e86\u4e00\u4e9b\u65b9\u6848\uff0c\u53d1\u73b0 Cloudflare \u4e5f\u8981\u5f53\u201c\u514d\u8d39\u8bc1\u4e66\u83e9\u8428\u201d\u4e86\u3002\u5c31\u5728\u4e0a\u4e2a\u6708\u5e95\uff0c\u8fd9\u4e2a\u9886\u57df\u8fce\u6765\u4e86\u4e00\u6761\u91cd\u78c5\u6d88\u606f\uff0c<code>Cloudflare \u6b63\u5f0f\u5ba3\u5e03\u8ba1\u5212\u6210\u4e3a\u9762\u5411\u516c\u4f17\u7684\u516c\u5171\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff08CA\uff09<\/code>\u3002\u800c\u5728\u6b64\u4e4b\u524d\uff0c\u514d\u8d39\u8bc1\u4e66\u7684\u6c5f\u6e56\u91cc\uff0cLet&#8217;s Encrypt \u51e0\u4e4e\u662f\u552f\u4e00\u7684\u201c\u4e3b\u6d41\u7b54\u6848\u201d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cloudflare \u7533\u8bf7\u6210\u4e3a\u516c\u5171 CA<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">2026 \u5e74 9 \u6708 29 \u65e5\uff0cCloudflare \u5728\u5b83\u7684\u751f\u65e5\u5468\uff08Birthday Week\uff09\u671f\u95f4\u5ba3\u5e03\uff0c\u8ba1\u5212\u6210\u4e3a\u4e00\u5bb6\u9762\u5411\u516c\u4f17\u7684\u516c\u5171\u8bc1\u4e66\u9881\u53d1\u673a\u6784\uff0c\u5e76\u5df2\u6b63\u5f0f\u63d0\u4ea4\u52a0\u5165 Chrome\u3001Apple\u3001Microsoft \u548c Mozilla \u56db\u5927\u6839\u8bc1\u4e66\u8ba1\u5212\u7684\u7533\u8bf7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46 Cloudflare \u81ea\u5df1\u4e5f\u5f3a\u8c03\uff0c<code>\u76ee\u524d\u5c1a\u672a\u5f00\u59cb\u7b7e\u53d1\u8bc1\u4e66\uff0c\u76f8\u5173\u5de5\u4f5c\u4ecd\u5904\u4e8e\u7533\u8bf7\u548c\u5ba1\u6279\u9636\u6bb5<\/code>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cloudflare \u653e\u5927\u62db\u4e86\uff0c\u6b63\u5f0f\u8fdb\u519b CA \u8bc1\u4e66\u9886\u57df\u4e86\uff0cLet&#8217;s Encrypt \u6bcf\u5929\u7b7e\u53d1 1000 \u4e07\u5f20\u8bc1\u4e66\u6b63\u5728\u6210\u4e3a\u8fc7\u53bb\u5f0f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6536\u8d2d GlobalSign \u7684\u6839<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u7ae0\u914d\u56fe\u53c2\u89c1\u6211\u7684\u516c\u4f17\u53f7\uff1a<a href=\"https:\/\/mp.weixin.qq.com\/s\/9lhxONgWJFE5c37Q-kXnFA\">https:\/\/mp.weixin.qq.com\/s\/9lhxONgWJFE5c37Q-kXnFA<\/a>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u65b0 CA \u6700\u5927\u7684\u95e8\u69db\u4e0d\u662f\u6280\u672f\uff0c\u800c\u662f\u4fe1\u4efb\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u65b0\u6839\u8bc1\u4e66\u8981\u88ab\u5168\u7403\u6d4f\u89c8\u5668\u3001\u64cd\u4f5c\u7cfb\u7edf\u548c\u8001\u65e7\u8bbe\u5907\u7684\u4fe1\u4efb\u5b58\u50a8\u6536\u5f55\uff0c\u5f80\u5f80\u9700\u8981\u6570\u5e74\u79ef\u7d2f\u3002\u56e0\u6b64 Cloudflare \u91c7\u53d6\u4e86\u4e24\u6761\u817f\u8d70\u8def\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6536\u8d2d\uff1a\u4e0e GlobalSign \u7b7e\u7f72\u6700\u7ec8\u534f\u8bae\uff0c\u6536\u8d2d\u4e00\u4e2a\u81ea 2012 \u5e74\u8d77\u5c31\u88ab\u5e7f\u6cdb\u4fe1\u4efb\u7684\u73b0\u6709\u6839\uff0c\u5feb\u901f\u83b7\u5f97\u8bbe\u5907\u517c\u5bb9\u6027\uff1b<\/li><li>\u81ea\u5efa\uff1a\u540c\u65f6\u7533\u8bf7\u5168\u65b0\u7684\u6839\u8bc1\u4e66\uff0c\u4ee5\u6ee1\u8db3\u672a\u6765 WebPKI \u751f\u6001\u65e5\u76ca\u6536\u7d27\u7684\u653f\u7b56\u8981\u6c42\u3002<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u8fd9\u5176\u4e2d\u4e5f\u6709\u51e0\u4e2a\u503c\u5f97\u5173\u6ce8\u7684\u7ec6\u8282\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>ACME \u662f\u7b2c\u4e00\u516c\u6c11\u3002Cloudflare \u660e\u786e\u8868\u793a\u5c06\u63d0\u4f9b\u514d\u8d39\u7684\u81ea\u52a8\u5316\u8bc1\u4e66\u670d\u52a1\uff0c\u5e76\u4ee5 ACME \u4f5c\u4e3a\u4e3b\u8981\u63a5\u53e3\uff0c\u7528\u6237\u53ea\u9700\u4fee\u6539 ACME \u76ee\u5f55\u5730\u5740\uff08directory URL\uff09\uff0c\u5373\u53ef\u628a\u73b0\u6709\u514d\u8d39 CA \u7684\u8bc1\u4e66\u7ba1\u7406\u6d41\u7a0b\u8fc1\u79fb\u8fc7\u6765\u3002<\/li><li>\u5f3a\u5236\u8981\u6c42\u5ba2\u6237\u7aef\u652f\u6301 ARI\u3002Cloudflare \u8ba1\u5212\u53ea\u5411\u652f\u6301 ACME Renewal Information\uff08RFC 9773\uff0cCA \u5411\u5ba2\u6237\u7aef\u4e0b\u53d1\u7eed\u671f\u65f6\u95f4\u7a97\u53e3\u7684\u6807\u51c6\u673a\u5236\uff09\u7684\u5ba2\u6237\u7aef\u7b7e\u53d1\u8bc1\u4e66\uff0c\u4ee5\u4fbf\u5728\u9700\u8981\u540a\u9500\u66ff\u6362\u65f6\u6709\u5e8f\u5b8c\u6210\u3002<\/li><li>\u4e3a\u4ec0\u4e48\u73b0\u5728\u5165\u573a\uff1f\u5197\u4f59\u3002Cloudflare \u5f15\u7528\u7684\u6570\u636e\u663e\u793a Let&#8217;s Encrypt \u6bcf\u5929\u7b7e\u53d1\u7ea6 1000 \u4e07\u5f20\u8bc1\u4e66\u3001\u670d\u52a1\u8d85 5 \u4ebf\u4e2a\u7f51\u7ad9\uff0c2025 \u5e74\u7d2f\u8ba1\u6d3b\u8dc3\u8bc1\u4e66\u8d85\u8fc7 40 \u4ebf\u5f20\u3002\u514d\u8d39\u81ea\u52a8\u5316\u8bc1\u4e66\u9ad8\u5ea6\u96c6\u4e2d\u4e8e\u5c11\u6570 CA\uff0c\u4e00\u65e6\u51fa\u95ee\u9898\uff0c\u5168\u7f51\u7f3a\u4e4f\u540c\u7b49\u7ea7\u66ff\u4ee3\u65b9\u6848\u3002<\/li><li>\u540e\u91cf\u5b50\u5e03\u5c40\u3002Cloudflare \u8ba1\u5212 2027 \u5e74\u7b2c\u4e00\u5b63\u5ea6\u7b7e\u53d1\u751f\u4ea7\u73af\u5883\u7684 Merkle Tree Certificates\uff08MTC\uff09\uff0c\u964d\u4f4e\u540e\u91cf\u5b50\u5bc6\u7801\u4f53\u7cfb\u4e0b\u8bc1\u4e66\u94fe\u81a8\u80c0\u5e26\u6765\u7684 TLS \u63e1\u624b\u5f00\u9500\uff0c\u4e14\u4e0e\u4f20\u7edf\u8bc1\u4e66\u5728\u540c\u4e00 CA \u4e2d\u5171\u5b58\u3001\u5e73\u6ed1\u8fc7\u6e21\u3002<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u793e\u533a\u600e\u4e48\u770b\uff1f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6d88\u606f\u53d1\u51fa\u540e\uff0cNodeSeek \u4e0a\u7f51\u53cb\u7684\u53cd\u5e94\u9887\u6709\u4ee3\u8868\u6027\u3002\u6709\u4eba\u8c03\u4f83\u201c\u4e92\u8054\u7f51\u4e2d\u5fc3\u5316\u53c8\u524d\u8fdb\u4e86\u4e00\u5927\u6b65\u201d\uff0c\u4e5f\u6709\u4eba\u8868\u793a\u201c\u8fd8\u662f\u8981\u611f\u8c22 Let&#8217;s Encrypt \u5f00\u4e86\u5148\u6cb3\u201d\u3002\u4e24\u79cd\u58f0\u97f3\u90fd\u6709\u9053\u7406\uff0c\u591a\u4e00\u4e2a\u514d\u8d39 CA \u610f\u5473\u7740\u5197\u4f59\u548c\u9009\u62e9\uff0c\u4f46\u514d\u8d39\u8bc1\u4e66\u57fa\u7840\u8bbe\u65bd\u7684\u96c6\u4e2d\u5ea6\u95ee\u9898\uff0c\u4e5f\u786e\u5b9e\u662f\u6574\u4e2a WebPKI \u503c\u5f97\u957f\u671f\u8ba8\u8bba\u7684\u8bae\u9898\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u5c31\u662f\u8bf4\uff0c\u77ed\u671f\u5185\uff08\u5ba1\u6279 + \u4fe1\u4efb\u6839\u5206\u53d1\u4ecd\u9700\u65f6\u95f4\uff09Let&#8217;s Encrypt \u4ecd\u662f\u4e3b\u529b\uff1b\u4f46\u628a\u8bc1\u4e66\u6d41\u7a0b\u505a\u6210\u6807\u51c6\u5316\u3001\u53ef\u8fc1\u79fb\u7684\uff0c\u662f\u5bf9\u672a\u6765\u6700\u7a33\u59a5\u7684\u51c6\u5907\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">acme.sh \u6210\u4e86\u4e3b\u6d41\u65b9\u6848<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u7ba1\u662f Let&#8217;s Encrypt \u8fd8\u662f\u5176\u5b83\u6536\u8d39\u8bc1\u4e66\uff0c\u81ea\u52a8\u5316\u7eed\u671f\u88ab\u8d8a\u6765\u8d8a\u591a\u7684\u4f01\u4e1a\u6240\u9009\u62e9\uff0c\u4e8e\u662f acme.sh \u5c31\u6210\u4e86\u4e3b\u6d41\u4e4b\u4e00\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e3b\u8981\u662f\uff0c\u5f53\u524d\u7684\u514d\u8d39\u8bc1\u4e66\u9762\u4e34\u4ee5\u4e0b\u75db\u70b9\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Let&#8217;s Encrypt \u514d\u8d39\u8bc1\u4e66\u53ea\u6709 90 \u5929\u6709\u6548\u671f\uff0c\u624b\u52a8\u7eed\u671f\u4e0d\u53ef\u6301\u7eed\uff0c\u5fc5\u987b\u81ea\u52a8\u5316\uff1b<\/li><li>\u6cdb\u57df\u540d\u8bc1\u4e66\uff08<code>*.example.com<\/code>\uff09\u65e0\u6cd5\u8d70 HTTP \u6587\u4ef6\u9a8c\u8bc1\uff0c\u53ea\u80fd\u7528 DNS-01 \u9a8c\u8bc1\uff0c\u800c\u963f\u91cc\u4e91\u3001\u817e\u8baf\u4e91\u7b49\u4e3b\u6d41\u5382\u5546\u7684\u514d\u8d39\u8bc1\u4e66\u901a\u5e38\u4e0d\u652f\u6301\u514d\u8d39\u7533\u8bf7\u6cdb\u57df\u540d\u8bc1\u4e66\uff1b<\/li><li>\u89e3\u51b3\u601d\u8def\u662f\u8ba9 ACME \u5ba2\u6237\u7aef\u76f4\u63a5\u8c03\u7528 DNS \u670d\u52a1\u5546\u7684 API\uff0c\u81ea\u52a8\u6dfb\u52a0\/\u5220\u9664 <code>_acme-challenge<\/code> TXT \u8bb0\u5f55\u5b8c\u6210\u9a8c\u8bc1\u3002<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u800c acme.sh \u662f\u76ee\u524d\u6700\u6d41\u884c\u7684\u9009\u62e9\uff0c\u7eaf Shell \u7f16\u5199\u3001\u96f6\u4f9d\u8d56\u3001\u5185\u7f6e\u963f\u91cc\u4e91\u7b49\u6570\u5341\u5bb6 DNS API \u652f\u6301\uff0c\u5b89\u88c5\u540e\u81ea\u52a8\u914d\u7f6e cron \u5b9a\u65f6\u4efb\u52a1\uff0c\u5230\u671f\u524d\u81ea\u52a8\u7eed\u671f\u5e76\u89e6\u53d1 reload\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u6211\u4eec\u5b9e\u64cd\u4e00\u4e0b\uff0c\u7528 acme.sh + \u963f\u91cc\u4e91 DNS API \u5b9e\u73b0\u5168\u81ea\u52a8\u8bc1\u4e66\u7ba1\u7406\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u9002\u7528\u573a\u666f\uff1a\u57df\u540d\u89e3\u6790\u6258\u7ba1\u5728\u963f\u91cc\u4e91 DNS\uff1b\u60f3\u8981\u514d\u8d39\u8bc1\u4e66\uff0c\u5c24\u5176\u662f<code>\u6cdb\u57df\u540d\u8bc1\u4e66<\/code>\uff1b\u5e0c\u671b\u4e00\u6b21\u914d\u7f6e\u3001\u6c38\u4e45\u81ea\u52a8\u7eed\u671f\u3002<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u8fdb\u884c\u51c6\u5907\u5de5\u4f5c\uff0c\u8fd9\u91cc\u4ee5\u963f\u91cc\u4e91\u4e3a\u4f8b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u4e00\u53f0 Linux \u670d\u52a1\u5668\uff08\u4efb\u610f\u53d1\u884c\u7248\u5747\u53ef\uff09<\/li><li>\u57df\u540d\u5df2\u6258\u7ba1\u5230\u963f\u91cc\u4e91\u4e91\u89e3\u6790 DNS<\/li><li>\u4e00\u4e2a\u963f\u91cc\u4e91\u8d26\u53f7\uff08\u7528\u4e8e\u521b\u5efa RAM \u5b50\u8d26\u53f7\uff09<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u4e0b\u6765\u662f\u7b2c 1 \u6b65\uff0c\u5b89\u88c5 acme.sh\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl https:\/\/get.acme.sh | sh -s email=taoge@xttblog.com\nsource ~\/.bashrc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u6210\u540e\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>acme.sh \u4f4d\u4e8e <code>~\/.acme.sh\/<\/code> \u76ee\u5f55\uff1b<\/li><li>\u81ea\u52a8\u521b\u5efa\u4e86 cron \u5b9a\u65f6\u4efb\u52a1\uff08<code>crontab -l<\/code> \u53ef\u67e5\u770b\uff09\uff0c\u7528\u4e8e\u540e\u7eed\u81ea\u52a8\u7eed\u671f\u3002<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u4e0b\u6765\u662f\u7b2c 2 \u6b65\uff0c\u521b\u5efa\u963f\u91cc\u4e91 RAM \u5b50\u8d26\u53f7\uff0c\u4e0d\u5efa\u8bae\u7528\u4e3b\u8d26\u53f7 Key\uff01\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u767b\u5f55\u963f\u91cc\u4e91\u63a7\u5236\u53f0 \u2192 \u8bbf\u95ee\u63a7\u5236 RAM \u2192 \u7528\u6237 \u2192 \u521b\u5efa\u7528\u6237\uff0c\u7528\u6237\u540d\u5982 <code>acme-cert-manager<\/code>\uff1b<\/li><li>\u8bbf\u95ee\u65b9\u5f0f\u52fe\u9009\u300c\u7f16\u7a0b\u8bbf\u95ee\u300d\uff0c\u83b7\u53d6 <code>AccessKey ID \/ AccessKey Secret<\/code>\uff08Secret \u53ea\u663e\u793a\u4e00\u6b21\uff0c\u52a1\u5fc5\u4fdd\u5b58\uff09\uff1b<\/li><li>\u4e3a\u8be5\u7528\u6237\u6dfb\u52a0\u6743\u9650\u7b56\u7565 <code>AliyunDNSFullAccess<\/code>\uff08\u7ba1\u7406\u4e91\u89e3\u6790 DNS \u7684\u6700\u5c0f\u6743\u9650\uff09\uff1b<\/li><li>\u5b89\u5168\u5efa\u8bae\uff1a\u5355\u72ec\u5b50\u8d26\u53f7 + \u6700\u5c0f\u6743\u9650\uff0cKey \u6cc4\u9732\u65f6\u5f71\u54cd\u9762\u53ef\u63a7\u3002<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u662f\u7b2c 3 \u6b65\uff0c\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export Ali_Key=\"\u4f60\u7684AccessKey ID\"\nexport Ali_Secret=\"\u4f60\u7684AccessKey Secret\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u53ef\u4ee5\u5199\u5165 <code>~\/.acme.sh\/account.conf<\/code> \u6301\u4e45\u5316\uff08\u6ce8\u610f <code>chmod 600<\/code> \u4fdd\u62a4\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u7136\u540e\u662f\u7b2c 4 \u6b65\uff0c\u7533\u8bf7\u8bc1\u4e66\uff08\u542b\u6cdb\u57df\u540d\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>acme.sh --issue -d xttblog.com -d \"*.xttblog.com\" --dns dns_ali<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u65f6\uff0c\u6267\u884c\u65f6 acme.sh \u4f1a\u6709\u4ee5\u4e0b\u6548\u679c\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5411 CA \u53d1\u8d77\u8ba2\u5355\uff1b<\/li><li>\u81ea\u52a8\u8c03\u7528\u963f\u91cc\u4e91 DNS API\uff0c\u6dfb\u52a0 <code>_acme-challenge.example.com<\/code> \u7684 TXT \u8bb0\u5f55\uff1b<\/li><li>\u7b49\u5f85 DNS \u751f\u6548\u540e\u5b8c\u6210\u9a8c\u8bc1\uff0c<code>\u9a8c\u8bc1\u901a\u8fc7\u81ea\u52a8\u6e05\u7406 TXT \u8bb0\u5f55<\/code>\uff1b<\/li><li>\u8bc1\u4e66\u751f\u6210\u5728 <code>~\/.acme.sh\/example.com_ecc\/<\/code> \u76ee\u5f55\u4e0b\u3002<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cacme.sh \u9ed8\u8ba4 CA \u662f ZeroSSL\uff0c\u5982\u9700\u6307\u5b9a Let&#8217;s Encrypt\uff0c\u52a0 <code>--server letsencrypt<\/code>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u63a5\u7740\u662f\u7b2c 5 \u6b65\uff0c\u5b89\u88c5\u8bc1\u4e66\u5230 Web \u670d\u52a1\u5668\uff08\u4ee5 Nginx \u4e3a\u4f8b\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>acme.sh --install-cert -d example.com \\\n  --key-file       \/etc\/nginx\/ssl\/example.com.key \\\n  --fullchain-file \/etc\/nginx\/ssl\/example.com.cer \\\n  --reloadcmd      \"systemctl reload nginx\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u610f\uff0c<code>--reloadcmd<\/code> \u4f1a\u5728\u6bcf\u6b21\u8bc1\u4e66\u66f4\u65b0\u540e\u81ea\u52a8\u6267\u884c\uff0c\u5b9e\u73b0 Web \u670d\u52a1\u5668\u70ed\u52a0\u8f7d\uff0c\u65e0\u9700\u91cd\u542f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u662f\u7b2c 6 \u6b65\uff0c\u4e5f\u662f\u6700\u540e\u4e00\u6b65\uff0c\u9a8c\u8bc1\u81ea\u52a8\u7eed\u671f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>crontab -l          # \u786e\u8ba4\u5b9a\u65f6\u4efb\u52a1\u5b58\u5728\nacme.sh --cron      # \u624b\u52a8\u89e6\u53d1\u4e00\u6b21\u7eed\u671f\u6d41\u7a0b\u6d4b\u8bd5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9ed8\u8ba4\u5728\u8bc1\u4e66<code>\u5230\u671f\u524d 60 \u5929<\/code>\u4f1a\u81ea\u52a8\u5c1d\u8bd5\u7eed\u671f\uff0c\u6210\u529f\u540e\u81ea\u52a8\u6267\u884c\u4e4b\u524d\u914d\u7f6e\u7684 <code>--reloadcmd<\/code>\uff0c\u5168\u7a0b\u65e0\u4eba\u503c\u5b88\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u540e<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cloudflare \u5165\u5c40\u516c\u5171 CA\uff0c\u627f\u8bfa\u4ee5 ACME \u4e3a\u6838\u5fc3\u3001\u53ea\u9700\u6539 directory URL \u5373\u53ef\u8fc1\u79fb\u3001\u5f3a\u5236 ARI \u81ea\u52a8\u7eed\u671f\uff0c\u8fd9\u4e9b\u8bbe\u8ba1\u51e0\u4e4e\u5c31\u662f\u5728\u8bf4\uff0c\u4f60\u4eca\u5929\u7528 acme.sh \u642d\u597d\u7684\u81ea\u52a8\u5316\u7ba1\u7ebf\uff0c\u660e\u5929\u53ef\u4ee5\u539f\u5c01\u4e0d\u52a8\u5730\u5207\u5230\u65b0 CA\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u65f6\uff0cCloudflare \u7684\u91ce\u5fc3\u80af\u5b9a\u4e0d\u6b62\u662f\u514d\u8d39\u7684 CA\uff0c\u6536\u8d39\u7684\u8bc1\u4e66\u6216\u8bb8\u4e5f\u5df2\u7ecf\u5728\u8def\u4e0a\u4e86\u3002Let&#8217;s Encrypt \u7684\u76c8\u5229\u6a21\u5f0f Cloudflare \u5e94\u8be5\u4f1a\u63a8\u9648\u51fa\u65b0\u3002\u5982\u679c\u672a\u6765\u5404\u4e2a\u4e91\u5382\u5546\u90fd\u641e\u81ea\u5df1\u7684\u81ea\u52a8\u5316\u514d\u8d39\u8bc1\u4e66\uff0cLet&#8217;s Encrypt \u7684\u5386\u53f2\u4f7f\u547d\u53ef\u80fd\u5c06\u4f1a\u88ab\u7ec8\u7ed3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cloudflare \u80fd\u5426\u8ba9\u514d\u8d39\u8bc1\u4e66\u53d8\u5929\uff0c\u62ed\u76ee\u4ee5\u5f85\u5427\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=5893\">\u514d\u8d39\u8bc1\u4e66\u8981\u53d8\u5929\uff1fCloudflare \u7533\u8bf7 CA \u8d44\u8d28\uff0c\u518d\u89c1 Let&#8217;s Encrypt<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6211\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u4f7f\u7528\u7684\u662f Let&#8217;s Encrypt \u63d0\u4f9b\u7684\u514d\u8d39\u8bc1\u4e66\uff0c3 \u4e2a\u6708\u8fc7\u671f\u4e00\u6b21\u3002 \u4ee5\u524d\uff0c\u514d\u8d39\u8bc1 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[994,1530,25,243,2],"class_list":["post-5893","post","type-post","status-publish","format-standard","hentry","category-yyzt","tag-ssl","tag-25","tag-243","tag-2"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5893"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5893\/revisions"}],"predecessor-version":[{"id":5894,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/5893\/revisions\/5894"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}