{"id":2826,"date":"2021-05-12T09:19:26","date_gmt":"2021-05-12T01:19:26","guid":{"rendered":"https:\/\/jir.idv.tw\/wordpress\/?p=2826"},"modified":"2021-05-12T09:19:26","modified_gmt":"2021-05-12T01:19:26","slug":"ubuntu%e4%bd%bf%e7%94%a8certbot%e5%a5%97%e4%bb%b6%ef%bc%8c%e8%87%aa%e5%8b%95%e6%9b%b4%e6%96%b0ssl%e6%86%91%e8%ad%89%ef%bc%8c%e7%b6%b2%e9%a0%81%e4%b8%bb%e6%a9%9f%e6%8f%90%e4%be%9bhttps%e7%9a%84","status":"publish","type":"post","link":"https:\/\/jir.idv.tw\/wordpress\/?p=2826","title":{"rendered":"[UBUNTU]\u4f7f\u7528CERTBOT\u5957\u4ef6\uff0c\u81ea\u52d5\u66f4\u65b0SSL\u6191\u8b49\uff0c\u7db2\u9801\u4e3b\u6a5f\u63d0\u4f9bHTTPS\u7684\u9023\u7dda"},"content":{"rendered":"<p>\u7d66\u81ea\u5df1\u7d00\u9304\u4e00\u4e0b\uff0c\u907f\u514d\u5fd8\u8a18\u548c\u627e\u4e0d\u5230\u8cc7\u6599\u3002<\/p>\n<p>\u9019\u5e7e\u5929\u6e05\u7406\u4fe1\u7bb1\u6642\uff0c\u767c\u73fe\u6709\u932f\u8aa4\u7684\u56de\u5831\u901a\u77e5\u3002<br \/>\n<strong>Cron Failure \/usr\/bin\/certbot renew &#8211;quiet<\/strong><br \/>\nChallenge failed for domain jir.idv.tw<br \/>\nChallenge failed for domain www.jir.idv.tw<br \/>\nAttempting to renew cert (jir.idv.tw) from \/etc\/letsencrypt\/renewal\/jir.idv.tw.conf produced an unexpected error: Some challenges have failed.. Skipping.<\/p>\n<p>\u7814\u7a76\u4e86\u4e00\u4e0b\uff0c\u4e0d\u77e5\u9053\u70ba\u4ec0\u9ebcCERTBOT\u7684\u5957\u4ef6\u7570\u5e38\uff0c\u8df3\u51fa\u8981\u770binstallation\u7684\u6587\u4ef6\u3002<br \/>\n\u4e7e\u8106\u7d66\u4ed6\u91cd\u88dd\u4e00\u6b21\u627e\u554f\u984c\uff0c\u66f4\u65b0APT\u3002<br \/>\n<code>sudo apt-get update<br \/>\nsudo apt-get install certbot<\/code><br \/>\n\u53e6\u5916\u6211\u7684\u7cfb\u7d71\u662fUBUNTU\u548cAPACHE\u7db2\u9801\u670d\u52d9\uff0c\u6240\u4ee5\u53e6\u5916\u5b89\u88ddPLUGIN\u4f86\u652f\u63f4\u670d\u52d9\u3002<br \/>\n<code>sudo apt-get install python3-certbot-apache<\/code><br \/>\n\u7136\u5f8c\u5b89\u88dd\u597d\u4ee5\u5f8c\uff0c\u770b\u6709\u5e7e\u500b\u7db2\u57df\u8981\u52a0\u5165\uff0c\u5c31\u90fd\u52a0-d xxx.xxx.xxx\u4f86\u65b0\u589e\u3002<br \/>\n<code>certbot --apache -d jir.idv.tw -d www.jir.idv.tw<\/code><br \/>\n\u9019\u500b\u57f7\u884c\u5f8c\uff0cCERTBOT\u7a0b\u5f0f\u4ed6\u6703\u81ea\u5df1\u53bb\u8ddfLet&#8217;s Encrypt\u7533\u8acb\u548c\u66f4\u65b0\u7cfb\u7d71\u7684\u8cc7\u6599\u3002<br \/>\n\u904e\u7a0b\u4e2d\u9084\u6703\u554f\u9019\u4e9b\u65b0\u589e\u7684\u5b50\u7db2\u57df\u8981\u600e\u9ebc\u548cAPACHE\u7d50\u5408\uff0c\u6211\u7684\u9078\u9805\u90fd\u662f\u90781\u3002<br \/>\n\u96d6\u7136\u6700\u5f8c\u9084\u662f\u6703\u6709\u6545\u969c\u8a0a\u606f\uff0c\u4f46\u662f\u6211\u7684\u5167\u5bb9\u53ea\u662f\u8aaa\u6709\u5e7e\u500b\u5b50\u7db2\u57df\u4e0d\u80fd\u7528\uff0c\u627e\u4e0d\u5230\u4e3b\u6a5f(\u9810\u7559XD)\u3002<br \/>\n\u4f46\u662f\u4ed6\u8aaa\u76f8\u95dc\u8cc7\u6599\u5df2\u7d93\u8ddfLet&#8217;s Encrypt\u7533\u8acb\u548c\u628a\u65b0\u589e\u7684\u6a94\u6848\u52a0\u5165\u5230\u6307\u5b9a\u7684\u76ee\u9304\u5132\u653e\u4e86\u3002<br \/>\n\u6240\u4ee5\u99ac\u4e0a\u6e2c\u8a66https\u9023\u7dda\u5230\u7db2\u9801\uff0c\u679c\u7136\u5c31\u6c92\u6709\u518d\u51fa\u73fe\u7570\u5e38\u7684SSL\u6191\u8b49\u554f\u984c\u3002<br \/>\n\u53e6\u5916\uff0c\u82e5\u7b2c\u4e00\u6b21\u5b89\u88dd\uff0c\u9700\u8981\u65b0\u589e\u4e00\u822a\u6307\u4ee4\u52a0\u5230CRONTAB\u88e1\u9762\uff0c\u6211\u662f\u6bcf\u500b\u79ae\u62dc\u90fd\u6aa2\u67e5\u4e00\u6b21\u6191\u8b49\u3002<br \/>\n<code>sudo nano \/etc\/crontab<br \/>\n30 5    * * 0   root    \/usr\/bin\/certbot renew --quiet<\/code><\/p>\n<p>\u8aaa\u660e\u6587\u4ef6\uff1a<br \/>\n<a href=\"https:\/\/certbot.eff.org\/docs\/install.html\" rel=\"noopener\" target=\"_blank\">https:\/\/certbot.eff.org\/docs\/install.html<\/a><br \/>\n\u5176\u4ed6\u53c3\u8003\uff1a<br \/>\n<a href=\"https:\/\/hackmd.io\/@8irD0FCGSQqckvMnLpAmzw\/B1JEPsqIw\" rel=\"noopener\" target=\"_blank\">https:\/\/hackmd.io\/@8irD0FCGSQqckvMnLpAmzw\/B1JEPsqIw<\/a><br \/>\n<a href=\"https:\/\/kejyuntw.gitbooks.io\/ubuntu-learning-notes\/content\/web\/ssl\/web-ssl-lets-encrypt.html\" rel=\"noopener\" target=\"_blank\">https:\/\/kejyuntw.gitbooks.io\/ubuntu-learning-notes\/content\/web\/ssl\/web-ssl-lets-encrypt.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d66\u81ea\u5df1\u7d00\u9304\u4e00\u4e0b\uff0c\u907f\u514d\u5fd8\u8a18\u548c\u627e\u4e0d\u5230\u8cc7\u6599\u3002 \u9019\u5e7e\u5929\u6e05\u7406\u4fe1\u7bb1\u6642\uff0c\u767c\u73fe\u6709\u932f\u8aa4\u7684\u56de\u5831\u901a\u77e5\u3002 Cron Failure \/ &#8230; <a title=\"[UBUNTU]\u4f7f\u7528CERTBOT\u5957\u4ef6\uff0c\u81ea\u52d5\u66f4\u65b0SSL\u6191\u8b49\uff0c\u7db2\u9801\u4e3b\u6a5f\u63d0\u4f9bHTTPS\u7684\u9023\u7dda\" class=\"read-more\" href=\"https:\/\/jir.idv.tw\/wordpress\/?p=2826\" aria-label=\"Read more about [UBUNTU]\u4f7f\u7528CERTBOT\u5957\u4ef6\uff0c\u81ea\u52d5\u66f4\u65b0SSL\u6191\u8b49\uff0c\u7db2\u9801\u4e3b\u6a5f\u63d0\u4f9bHTTPS\u7684\u9023\u7dda\">\u95b1\u8b80\u5168\u6587<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2826","post","type-post","status-publish","format-standard","hentry","category-4"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2826"}],"version-history":[{"count":1,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2826\/revisions"}],"predecessor-version":[{"id":2827,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2826\/revisions\/2827"}],"wp:attachment":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}