{"id":694,"date":"2017-03-16T11:38:00","date_gmt":"2017-03-16T03:38:00","guid":{"rendered":"http:\/\/www.behindgfw.com\/archives\/?p=694"},"modified":"2017-03-16T12:47:04","modified_gmt":"2017-03-16T04:47:04","slug":"install-lets-encrypt-multi-domain-certificate-on-apache","status":"publish","type":"post","link":"https:\/\/www.behindgfw.com\/archives\/2017\/03\/install-lets-encrypt-multi-domain-certificate-on-apache.html","title":{"rendered":"\u5728Apache\u4e0a\u5b89\u88c5Let\u2019s Encrypt\u591a\u57df\u540d\u8bc1\u4e66"},"content":{"rendered":"<p><strong>\u80cc\u666f<\/strong><\/p>\n<p>\u56e0\u4e3aWoSign\uff08\u6c83\u901a\uff09<a href=\"https:\/\/xshell.net\/security\/1602.html\" target=\"_blank\">\u672a\u7ecf\u6388\u6743<\/a>\u5c31\u4e3aGitHub\u7684\u57df\u540d\u4e4b\u4e00\u9881\u53d1\u4e86\u8bc1\u4e66\uff0c\u8fd9\u4fc3\u4f7f\u4e86\u4e00\u9879Mozilla\u548c\u5b89\u5168\u793e\u533a\u5408\u4f5c\u8fdb\u884c\u7684\u516c\u5f00\u8c03\u67e5\uff0c\u8c03\u67e5\u53d1\u73b0\u4e86\u8bb8\u591a\u5176\u4ed6<a href=\"https:\/\/wiki.mozilla.org\/CA:WoSign_Issues\" target=\"_blank\">WoSign\u8bef\u89e3\u7684\u6848\u4f8b<\/a>\uff0c\u8c03\u67e5\u8fd8\u53d1\u73b0Wosign\u5df2\u7ecf\u79d8\u5bc6\u6536\u8d2dStartCom\uff0c\u5e76\u4e14\u540e\u8005\u5df2\u7ecf\u5f00\u59cb\u4f7f\u7528Wosign\u7684\u57fa\u7840\u8bbe\u65bd\u3001\u5458\u5de5\u3001\u653f\u7b56\u3001\u7b7e\u53d1\u7cfb\u7edf\u3002<\/p>\n<p>\u6700\u7ec8\uff0c\u4ece<a href=\"https:\/\/security.googleblog.com\/2016\/10\/distrusting-wosign-and-startcom.html\" target=\"_blank\">Chrome 56<\/a>\u5f00\u59cb\uff0c\u7531WoSign\u548cStartCom\u57282016\u5e7410\u670821\u65e500:00:00 UTC\u540e\u9881\u53d1\u7684\u8bc1\u4e66\u4e0d\u53d7\u4fe1\u4efb\u3002<\/p>\n<p>Apple Root Certificate Program 2016\u5e7410\u670801\u65e5 <a href=\"https:\/\/support.apple.com\/en-us\/HT204132\" target=\"_blank\">\u6b63\u5f0f\u5ba3\u5e03<\/a>\u5728\u5373\u5c06\u53d1\u5e03\u7684\u5b89\u5168\u66f4\u65b0\u4e2d\u5bf9\u6c83\u901a\u7684 \u201cWoSign CA Free SSL Certificate G2\u201d \u53d6\u6d88\u4fe1\u4efb\uff0c\u6240\u6709\u5df2\u7ecf\u53d1\u5e03\u5230 CT \u7684\u65e7\u8bc1\u4e66\u4e0d\u53d7\u5f71\u54cd\u3002\u6b63\u5728\u91c7\u53d6\u8fdb\u4e00\u6b65\u7684\u63aa\u65bd\uff0c\u5c06\u963b\u6b62\u6765\u81eaWoSign\u548cStartCom\u6839CA\u7684\u8bc1\u4e66\u3002<\/p>\n<p>Mozilla \u4e8e10\u670820\u65e5<a href=\"https:\/\/blog.mozilla.org\/security\/2016\/10\/24\/distrusting-new-wosign-and-startcom-certificates\/\" target=\"_blank\">\u516c\u5e03<\/a>\u4e86\u5bf9 \u6c83\u901aCA \u7684\u6700\u7ec8\u5904\u7406\u610f\u89c1\uff0c\u5b83\u4e0d\u518d\u4fe1\u4efb\u572810\u670821\u65e5\u4e4b\u540e\u7b7e\u53d1\u7684WoSign\u548cStartCom\u6839CA\u7684\u8bc1\u4e66\uff0c\u4ece Firefox 51 \u8d77\u79fb\u9664\u5bf94\u4e2a\u6c83\u901a\u6839\u8bc1\u4e66\u7684\u4fe1\u4efb\u3002<\/p>\n<p><strong>\u4f7f\u7528Let\u2019s Encrypt\u514d\u8d39\u8bc1\u4e66<\/strong><\/p>\n<p>\u53bb\u5e743\u6708\u4ee5\u6765\uff0cbehindgfw.com\u4f7f\u7528\u7684\u662fstartcom\u7684<a href=\"http:\/\/www.behindgfw.com\/archives\/2016\/03\/server-name-indication-ssl-check-baidu-slabot.html\" target=\"_blank\">\u514d\u8d39\u8bc1\u4e66<\/a>\uff0c\u56e0\u4e3a\u65e7\u7684\u8bc1\u4e66\u8fd8\u53ef\u4ee5\u7528\uff0c\u6240\u4ee5\u4e00\u76f4\u6ca1\u6709\u66f4\u6362\u3002now,it&#8217;s time\u3002<\/p>\n<p>\u4f7f\u7528<a href=\"https:\/\/letsencrypt.org\/\" target=\"_blank\">Let\u2019s Encrypt<\/a>\u5b98\u65b9\u63a8\u8350\u4f7f\u7528<a href=\"https:\/\/certbot.eff.org\/\" target=\"_blank\">certbot<\/a>\u5ba2\u6237\u7aef\uff0c\u56e0\u4e3a\u8981\u652f\u6301SNI\u591a\u57df\u540d\uff0c\u5728<a href=\"https:\/\/blog.tanteng.me\/2016\/09\/lets-encrypt-multi-domain-https\/\" target=\"_blank\">tanteng.me<\/a>\u4e0a\u4f7f\u7528\u4e86acme-tiny\u5b8c\u6210\u9a8c\u8bc1\u7b7e\u53d1\uff0c\u770b\u4e86\u534a\u5929\u89c9\u5f97\u8fd8\u662f\u6bd4\u8f83\u7e41\u7410\u3002\u7814\u7a76\u6700\u540e\u53d1\u73b0certbot\u4e5f\u662f\u53ef\u4ee5\u8fbe\u5230SNI\u591a\u57df\u540d\u529f\u80fd\u3002\u793a\u4f8b\u5982\u4e0b\uff1a<\/p>\n<pre>wget https:\/\/dl.eff.org\/certbot-auto\r\nchmod a+x certbot-auto\r\n.\/certbot-auto\u00a0certonly\u00a0--webroot\u00a0-w\u00a0\/var\/www\/behindgfw.com\/public_html\u00a0\u00a0-d behindgfw.com\u00a0-d www.<a href=\"http:\/\/www.behindgfw.com\">behindgfw<\/a>.com\u00a0-w\u00a0\/var\/www\/behindgfw.org\/public_html -d behindgfw.org\u00a0-d www.behindgfw.org<\/pre>\n<p>certonly\u00a0&#8211;webroot\u9009\u9879\u53ef\u4ee5\u5728\u53d1\u8bc1\u8fc7\u7a0b\u4e2d\u4e0d\u505c\u6b62Web\u670d\u52a1\u5668\uff0c\u4f7f\u7528\u672c\u5730\u7f51\u7edc\u670d\u52a1\u5668\u9a8c\u8bc1\uff0c&#8211;webroot-path\u6216-w\u4f7f\u7528\u5305\u542b\u7531\u60a8\u7684Web\u670d\u52a1\u5668\u63d0\u4f9b\u7684\u6587\u4ef6\u7684\u9876\u7ea7\u76ee\u5f55\uff08\u201cweb\u6839\u76ee\u5f55\u201d\uff09\u3002<\/p>\n<blockquote><p>&#8230;&#8230;<\/p>\n<p>Saving debug log to \/var\/log\/letsencrypt\/letsencrypt.log<\/p>\n<p>&#8230;&#8230;<\/p>\n<p>Performing the following challenges:<br \/>\nhttp-01 challenge for behindgfw.com<br \/>\nhttp-01 challenge for www.behindgfw.com<br \/>\nhttp-01 challenge for behindgfw.org<br \/>\nhttp-01 challenge for www.behindgfw.org<br \/>\nUsing the webroot path \/var\/www\/behindgfw.org\/public_html for all unmatched domains.<br \/>\nWaiting for verification&#8230;<br \/>\nCleaning up challenges<br \/>\nGenerating key (2048 bits): \/etc\/letsencrypt\/keys\/0000_key-certbot.pem<br \/>\nCreating CSR: \/etc\/letsencrypt\/csr\/0000_csr-certbot.pem<\/p>\n<p>IMPORTANT NOTES:<br \/>\n&#8211; Congratulations! Your certificate and chain have been saved at<br \/>\n\/etc\/letsencrypt\/live\/behindgfw.com\/fullchain.pem. Your cert will<br \/>\nexpire on 2017-06-13. To obtain a new or tweaked version of this<br \/>\ncertificate in the future, simply run certbot-auto again. To<br \/>\nnon-interactively renew *all* of your certificates, run<br \/>\n&#8220;certbot-auto renew&#8221;<\/p>\n<p>&#8230;&#8230;<\/p><\/blockquote>\n<p>\u4f7f\u7528\/etc\/letsencrypt\/live\u76ee\u5f55\u4e0b\u7684fullchain.pem\u3001privkey.pem\u4fee\u6539Apache\u8bbe\u7f6e\uff1a<\/p>\n<blockquote><p>SSLCertificateFile \/etc\/letsencrypt\/live\/behindgfw.com\/fullchain.pem<br \/>\nSSLCertificateKeyFile \/etc\/letsencrypt\/live\/behindgfw.com\/privkey.pem<br \/>\nSSLCertificateChainFile \/etc\/letsencrypt\/live\/behindgfw.com\/fullchain.pem<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f \u56e0\u4e3aWoSign\uff08\u6c83\u901a\uff09\u672a\u7ecf\u6388\u6743\u5c31\u4e3aGitHub\u7684\u57df\u540d\u4e4b\u4e00\u9881\u53d1\u4e86\u8bc1\u4e66\uff0c\u8fd9\u4fc3\u4f7f\u4e86\u4e00\u9879Mozilla\u548c\u5b89\u5168\u793e [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[35,32,25],"class_list":["post-694","post","type-post","status-publish","format-standard","hentry","category-webdev","tag-domain","tag-linux","tag-security"],"_links":{"self":[{"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/posts\/694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/comments?post=694"}],"version-history":[{"count":2,"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/posts\/694\/revisions"}],"predecessor-version":[{"id":696,"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/posts\/694\/revisions\/696"}],"wp:attachment":[{"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/media?parent=694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/categories?post=694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.behindgfw.com\/archives\/wp-json\/wp\/v2\/tags?post=694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}