{"id":27,"date":"2019-05-13T13:33:10","date_gmt":"2019-05-13T05:33:10","guid":{"rendered":"https:\/\/thereisno.top:4430\/?p=27"},"modified":"2024-09-25T14:51:11","modified_gmt":"2024-09-25T06:51:11","slug":"%e4%bd%bf%e7%94%a8lets-encrypt-%e9%83%a8%e7%bd%b2https","status":"publish","type":"post","link":"https:\/\/thereisno.top\/?p=27","title":{"rendered":"\u4f7f\u7528Let\u2019s Encrypt \u90e8\u7f72https"},"content":{"rendered":"\n<p>1\u3001\u5b89\u88c5<\/p>\n\n\n\n<p><strong>\u5b98\u65b9\u5b89\u88c5\u65b9\u5f0f<\/strong><\/p>\n\n\n\n<p> $ sudo apt-get update<br> $ sudo apt-get install software-properties-common<br> $ sudo add-apt-repository universe<br> $ sudo add-apt-repository ppa:certbot\/certbot<br> $ sudo apt-get update<br> $ sudo apt-get install certbot python-certbot-nginx <\/p>\n\n\n\n<p>2\u3001\u751f\u6210\u8bc1\u4e66<\/p>\n\n\n\n<p>$ sudo certbot &#8211;nginx<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u6267\u884c\u547d\u4ee4\u540e\u6309\u7167\u63d0\u793a\u8f93\u5165\u53c2\u6570\uff0c\u76f4\u63a5\u4e0b\u4e00\u6b65\uff0c\u6700\u540e\u4f1a\u6709\u91cd\u8981\u63d0\u793a\uff0c\u5305\u542b\u8bc1\u4e66\u5b58\u653e\u4f4d\u7f6e\uff0c\u9700\u8981\u8bb0\u4f4f\uff0c\u7528\u4e8e\u914d\u7f6enginx\u3001apache\u3001tomcat\u7b49<\/p>\n\n\n\n<p>IMPORTANT NOTES:<\/p>\n\n\n\n<p>&nbsp;&#8211; Congratulations! Your certificate and chain\nhave been saved at:<\/p>\n\n\n\n<p>&nbsp;&nbsp; \/etc\/letsencrypt\/live\/123.com\/fullchain.pem<\/p>\n\n\n\n<p>&nbsp;&nbsp; Your key file has been saved at:<\/p>\n\n\n\n<p>&nbsp;&nbsp; \/etc\/letsencrypt\/live\/ 123.com \/privkey.pem<\/p>\n\n\n\n<p>&nbsp;&nbsp; Your cert will expire on 2019-08-08. To\nobtain a new or tweaked<\/p>\n\n\n\n<p>&nbsp;&nbsp; version of this certificate in the future,\nsimply run certbot again<\/p>\n\n\n\n<p>&nbsp;&nbsp; with the &#8220;certonly&#8221; option. To\nnon-interactively renew *all* of<\/p>\n\n\n\n<p>&nbsp;&nbsp; your certificates, run &#8220;certbot\nrenew&#8221;<\/p>\n\n\n\n<p>&nbsp;&#8211; If you like Certbot, please consider\nsupporting our work by:<\/p>\n\n\n\n<p>3\u3001\u81ea\u52a8\u66f4\u65b0<\/p>\n\n\n\n<p>\u6700\u540e\u4e00\u6b65\uff0c\u5c31\u662f\u8bc1\u4e66\u7684\u81ea\u52a8\u7eed\u671f\u4e86\u3002Let\u2019s Encrypt\u7684\u8bc1\u4e66\uff0c\u9ed8\u8ba4\u7684\u6709\u6548\u671f\u662f90\u5929\uff0c\u4e0d\u8fc7\u5b98\u65b9\u63a8\u8350\u6bcf60\u5929\u7eed\u671f\u3002\u5230\u671f\u4e4b\u540e\uff0c\u6211\u4eec\u9700\u8981\u7528\u547d\u4ee4\u6765\u4e3a\u8bc1\u4e66\u7eed\u671f\uff0c\u4e0d\u8fc7\u6211\u4eec\u662f\u61d2\u4eba\uff0c\u8fd9\u79cd\u4f53\u529b\u6d3b\u8fd8\u662f\u4ea4\u7ed9\u673a\u5668\u6765\u5b8c\u6210\u6bd4\u8f83\u5408\u9002\u3002\u6240\u4ee5\uff0c\u6211\u4eec\u53ef\u4ee5\u7528Linux\u7684cron job\u6765\u5b8c\u6210\u8fd9\u7c7b\u7684\u4efb\u52a1\uff0c\u914d\u7f6ecron job\uff0c\u6bcf\u4e24\u4e2a\u6708\u7684\u7b2c\u4e00\u5929\uff0c\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff1a<br>\nvi \/etc\/crontab <\/p>\n\n\n\n<p>0     0    1   *\/2      *        certbot  renew  &#8211;post-hook&nbsp; &#8220;systemctl reload nginx &#8221; &#8211;post-hook &#8220;systemctl reload apache2&#8221;&nbsp;<\/p>\n\n\n\n<p>\u6ce8\u610f\u5728cron job\u91cc\u9762\u9700\u8981\u7528\u7edd\u5bf9\u8def\u5f84<\/p>\n\n\n\n<p>4\u3001nginx\u914d\u7f6e\u53c2\u8003 <a href=\"https:\/\/thereisno.top\/wp-admin\/post.php?post=578&amp;action=edit\">\u300cNginx \u53cd\u5411\u4ee3\u7406https\u914d\u7f6e\u300d <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u5b89\u88c5 \u5b98\u65b9\u5b89\u88c5\u65b9\u5f0f $ sudo apt-get update $ sudo apt-get instal &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/thereisno.top\/?p=27\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u4f7f\u7528Let\u2019s Encrypt \u90e8\u7f72https\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":2,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":1036,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions\/1036"}],"wp:attachment":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}