{"id":8,"date":"2016-09-04T08:40:00","date_gmt":"2016-09-03T23:40:00","guid":{"rendered":"https:\/\/jikoman.sin-cos.com\/blog\/?p=8"},"modified":"2016-09-04T08:40:00","modified_gmt":"2016-09-03T23:40:00","slug":"dti-let-encryp","status":"publish","type":"post","link":"https:\/\/jikoman.sin-cos.com\/blog\/2016\/09\/dti-let-encryp\/","title":{"rendered":"DTI\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9 Let&#39;s encrypt\u3092\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u8a2d\u5b9a\u3057\u305f\u30e1\u30e2"},"content":{"rendered":"<p>\u4eca\u65e5\u306f\u5b8c\u5168\u306b\u30e1\u30e2<\/p>\n<p>Let&#8217;s encrypt\u304c\u672c\u683c\u7a3c\u50cd\u3057\u3066\u3044\u308b\u3068\u306e\u5642\u3092\u968f\u5206\u3068\u524d\u306b\u805e\u3044\u3066\u3044\u308b\u3002<br \/>\n\u591a\u5206\u30b5\u30fc\u30d0\u30fc\u306b\u306f\u305d\u306e\u5fc5\u8981\u6761\u4ef6\u306ePython2.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306f\u305a\u3002<\/p>\n<p>$ python -VPython 2.7.9<\/p>\n<div>\n\u3088\u3057\u3001\u4ffa\u5929\u624d\uff01<\/div>\n<div>\nV\u306f\u5927\u6587\u5b57\u3060\u3088\u3002\u5c0f\u6587\u5b57\u3058\u3083\u306a\u3044\u3088\u3002<\/div>\n<div>\n<\/div>\n<div>\n\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4f55\u3060\u304b\u3093\u3060\u6642\u306f\u6d41\u308c\u3066\u3044\u3066\u3001letsencrypt-auto\u3067\u306f\u306a\u304f\u3001certbot-auto\u306b\u6539\u540d\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/div>\n<div>\n\u306a\u306e\u3067\u3001<\/div>\n<p>$ sudo git clone https:\/\/github.com\/certbot\/certbot \/opt\/cerbot<\/p>\n<div>\n\u3067\u3001\u53d6\u3063\u3066\u304d\u3066\u3001<\/div>\n<p>$ sudo .\/certbot-auto certonly &#8211;agree-tos &#8211;rsa-key-size 4096 &#8211;renew-by-default -m <b><i>dnsadmin@mydomain.com<\/i><\/b> &#8211;webroot -w <i>\/var\/www\/html\/<\/i> -d <i><b>mail.mydomain.com<\/b><\/i> &#8211;renew-by-default<br \/>\n\u3067\u3001\u8a3c\u660e\u66f8\u4f5c\u6210\u3002<br \/>\ncertonly\u3092\u5165\u308c\u306a\u3044\u3068\u3001run\u30e2\u30fc\u30c9\u306b\u306a\u3063\u3066\u3001apache\u306e\u8a2d\u5b9a\u3092\u5909\u3048\u306b\u884c\u304f\u3089\u3057\u3044\u3002<br \/>\n-m\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u9023\u7d61\u7528\u3002<br \/>\n-w\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001\u4eca\u56de\u30e1\u30fc\u30eb\u306e\u8a3c\u660e\u66f8\u3060\u304b\u3089\u610f\u5473\u306a\u3057\u3002<br \/>\n\u66f4\u65b0\u306f90\u65e5\u3054\u3068\u5fc5\u8981\u3002<\/p>\n<p>Postfix\u306e\u8a2d\u5b9a\u3092\u5909\u66f4<\/p>\n<p>$ sudo vi \/etc\/postfix\/main.cf<\/p>\n<p>smtpd_tls_cert_file = \/etc\/letsencrypt\/live\/<b><i>mail.mydomain.com<\/i><\/b>\/fullchain.pem<br \/>\nsmtpd_tls_key_file = \/etc\/letsencrypt\/live\/<b><i>mail.mydomain.com<\/i><\/b>\/privkey.pem<br \/>\nDovecot\u306e\u8a2d\u5b9a\u3082\u5909\u66f4<\/p>\n<p>$ sudo nano \/etc\/dovecot\/conf.d\/10-ssl.conf<\/p>\n<p>ssl_cert =<br \/>\n<i>mail.mydomain.com<\/i>\/fullchain.pem <br \/>\nssl_key = <i>mail.mydomain.com<\/i>\/privkey.pem\u305d\u3057\u3066\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u518d\u8d77\u52d5<\/p>\n<p>$ sudo service postfix restart<br \/>\n$ sudo service docevot restart<br \/>\nYes!<br \/>\n\u53bb\u5e74\u304b\u3089\u6b62\u307e\u3063\u3066\u3044\u305fGmail\u304b\u3089\u306e\u30e1\u30fc\u30eb\u53d6\u5f97\u304c\u5fa9\u6d3b\u3057\u305f\u305c\uff01<\/p>\n<p>\u3067\u3001\u81ea\u52d5\u66f4\u65b0\u306f\u3001\u3001\u3001\u307e\u305f\u4eca\u5ea6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u306f\u5b8c\u5168\u306b\u30e1\u30e2 Let&#8217;s encrypt\u304c\u672c\u683c\u7a3c\u50cd\u3057\u3066\u3044\u308b\u3068\u306e\u5642\u3092\u968f\u5206\u3068\u524d\u306b\u805e\u3044\u3066\u3044\u308b\u3002 \u591a\u5206\u30b5\u30fc\u30d0\u30fc\u306b\u306f\u305d\u306e\u5fc5\u8981\u6761\u4ef6\u306ePython2.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306f\u305a\u3002 $ python -VPython 2. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,130],"tags":[17,43],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-pc","category-130","tag-dti","tag-vps"],"_links":{"self":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jikoman.sin-cos.com\/blog\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}