{"id":296,"date":"2018-11-02T23:16:29","date_gmt":"2018-11-02T15:16:29","guid":{"rendered":"https:\/\/wp.yaanren.win\/?p=296"},"modified":"2018-11-02T23:16:29","modified_gmt":"2018-11-02T15:16:29","slug":"letsencrypt%e5%85%8d%e8%b4%b9https%e6%b3%9b%e5%9f%9f%e5%90%8d%ef%bc%88-yourdomain-com%ef%bc%89%e8%af%81%e4%b9%a6%e7%94%b3%e8%af%b7","status":"publish","type":"post","link":"https:\/\/wp.625300.xyz\/?p=296","title":{"rendered":"letsencrypt\u514d\u8d39https\u6cdb\u57df\u540d\u8bc1\u4e66\u7533\u8bf7"},"content":{"rendered":"<p>\u539f\u6587\uff1ahttps:\/\/blog.csdn.net\/zcyuefan\/article\/details\/82986844<\/p>\n<p>\u5b89\u88c5\u73af\u5883CentOS<br \/>\n*.example.com\u5f62\u5f0f\u7684\u57df\u540d\u5373\u4e3a\u6cdb\u57df\u540d\uff0c\u4e0d\u901a\u7684\u5b50\u57df\u540d\u5171\u7528\u4e00\u4e2a\u8bc1\u4e66\uff0c\u7701\u53bb\u591a\u6b21\u7533\u8bf7\u7684\u70e6\u607c<\/p>\n<p>1. \u5de5\u5177\u5b89\u88c5<br \/>\n\u5b89\u88c5\u6700\u65b0\u7684certbot<br \/>\nsudo yum install -y certbot<br \/>\n\u5df2\u5b89\u88c5cerbot\uff0c\u9700\u5347\u7ea7\u81f3\u9ad8\u7248\u672c<br \/>\nsudo yum update -y certbot<\/p>\n<p>2. \u8bc1\u4e66\u7533\u8bf7<br \/>\n\u5c06*.yourdomain.com \u66ff\u6362\u6210\u4f60\u7684\u6cdb\u57df\u540d<br \/>\n\u8fd0\u884c\u547d\u4ee4\uff1a<br \/>\nsudo certbot certonly &#8211;preferred-challenges dns &#8211;manual -d *.yourdomain.com &#8211;server https:\/\/acme-v02.api.letsencrypt.org\/directory<\/p>\n<p>\u51fa\u73b0\u4ee5\u4e0b\u5185\u5bb9\u540e\uff0c\u8bf7\u5728\u963f\u91cc\u4e91\u4e91\u89e3\u6790\u4e2d\u6dfb\u52a0\u4e00\u6761TXT\u89e3\u6790\u8bb0\u5f55<\/p>\n<p>Please deploy a DNS TXT record under the name<br \/>\n_acme-challenge.yourdomain.com with the following value:<\/p>\n<p>xxxxx<\/p>\n<p>Before continuing, verify the record is deployed.<\/p>\n<p>\u6dfb\u52a0\u963f\u91cc\u4e91\u4e91\u89e3\u6790TXT\u89e3\u6790\u8bb0\u5f55<\/p>\n<p>3. \u8bc1\u4e66\u4f7f\u7528\uff08nginx\uff09<br \/>\n\/etc\/nginx\/conf.d\u4e2d\u65b0\u589e\u914d\u7f6e\u6587\u4ef6xx.conf: \u6dfb\u52a0server\u8282\u70b9\u914d\u7f6e\u5e76\u8bbe\u7f6e\u83b7\u53d6\u5230\u5927\u8bc1\u4e66\u5730\u5740<\/p>\n<p>4. \u8bc1\u4e66\u81ea\u52a8\u66f4\u65b0<br \/>\nletsencrypt\u7684\u8bc1\u4e66\u6709\u6548\u671f\u662f\u4e09\u4e2a\u6708\uff0c\u53ef\u8bbe\u7f6ecrontab\u81ea\u52a8\u4efb\u52a1\u8fdb\u884c\u66f4\u65b0<\/p>\n<p>30 1 10 * * \/usr\/bin\/certbot renew &amp;&amp; \/usr\/sbin\/nginx -s reload # \u6bcf\u670810\u65e51\u70b930\u5206\u6267\u884c\u4e00\u6b21<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\uff1ahttps:\/\/blog.csdn.net\/zcyuefan\/article\/details\/82986&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-296","post","type-post","status-publish","format-standard","hentry","category-32"],"_links":{"self":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=296"}],"version-history":[{"count":0,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=\/wp\/v2\/posts\/296\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.625300.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}