{"id":49,"date":"2018-12-29T11:20:16","date_gmt":"2018-12-29T02:20:16","guid":{"rendered":"https:\/\/wordpress.k8s.yukiafronia.com\/?p=49"},"modified":"2020-08-10T16:14:14","modified_gmt":"2020-08-10T07:14:14","slug":"lets-encrypt-%e5%b0%8e%e5%85%a5%e6%89%8b%e5%bc%95%e3%81%8d","status":"publish","type":"post","link":"https:\/\/blog.yukiafronia.com\/?p=49","title":{"rendered":"Let\u2019s Encrypt \u5c0e\u5165\u624b\u5f15\u304d"},"content":{"rendered":"<p>\u3069\u3082\u3069\u3082\u3001\u30d4\u30f3\u6751\u3067\u3059\u3002<br \/>\n2019\u5e74\u307e\u3067\u3042\u3068\u5c11\u3057\u3068\u3044\u3046\u3068\u3053\u308d\u3067\u3059\u304c\u30012018\u5e74\u5185\u306bhttps\u306e\u5c0e\u5165\u3092\u81ea\u5206\u3067\u3067\u304d\u306a\u3044\u3063\u3066\u3044\u3046\u306e\u306f\u4f55\u304b\u4eca\u307e\u3067linux\u4f7f\u3063\u3066\u3044\u308d\u3093\u306a\u3053\u3068\u3084\u3063\u3066\u304d\u307e\u3057\u305f\u304c &quot;\u3048\u3047\uff5e\u3001SSL\u5316\u3059\u3089\u3067\u304d\u306a\u3044\u306e\u3049\uff5e\uff1f&quot; \u3068\u8ab0\u304b\u306b\u8a00\u308f\u308c\u305d\u3046\u306a\u6c17\u304c\u3059\u308b\u306e\u3067\u9811\u5f35\u3063\u3066\u3084\u3063\u3066\u307f\u307e\u3059\u3002  <\/p>\n<h2>Let\u2019s Encrypt\u3063\u3066\u4f55?<\/h2>\n<p>\u3053\u308c\u306f\u3067\u3059\u306d\u3001web\u30b5\u30fc\u30d3\u30b9\u3092https\u5316\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u7b2c\u4e09\u8005\u6a5f\u95a2\u306b &quot;\u3053\u306eweb\u30b5\u30fc\u30d3\u30b9\u306f\u5b89\u5168\u3060\u3088&quot; \u3068\u3044\u3046\u3088\u3046\u306a\u304a\u58a8\u4ed8\u304d\u3092\u3082\u3089\u3046\u305f\u3081\u306e\u8a3c\u660e\u66f8\u3092\u30bf\u30c0\u3067\u767a\u884c\u3057\u3066\u3082\u3089\u3048\u308b\u30b5\u30fc\u30d3\u30b9\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u3041\u3001\u4eba\u9593 &quot;\u30bf\u30c0&quot; \u3068\u3044\u3046\u8a00\u8449\u4ee5\u4e0a\u306b\u602a\u3057\u3044\u3082\u306e\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u4e0b\u8a18\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002  <\/p>\n<blockquote>\n<p>\u300c\u8a3c\u660e\u66f8\u306e\u767a\u884c\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u66f4\u65b0\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u81ea\u52d5\u5316\u300d\u3057\u305f\u304b\u3089\u3067\u3059\u3002\u304a\u4f7f\u3044\u306b\u306a\u308b\u3068\u308f\u304b\u308a\u307e\u3059\u304c\u3001\u6163\u308c\u308b\u3068\u8a2d\u5b9a\u306f\u3042\u3063\u3068\u3044\u3046\u9593\u306b\u7d42\u308f\u308a\u307e\u3059\u3002<br \/>\n\u3064\u304e\u306b\u5927\u5207\u306a\u5b89\u5168\u6027\u306b\u3064\u3044\u3066\u3067\u3059\u3002\u78ba\u304b\u306b\u904e\u53bb\u306b\u306f\u4e0d\u6b63\u4f7f\u7528\u3055\u308c\u305f\u60c5\u5831\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3060\u3001\u5c02\u9580\u5bb6\u3067\u69cb\u6210\u3055\u308c\u305f\u6280\u8853\u9867\u554f\u306b\u3088\u3063\u3066\u652f\u63f4\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u5b89\u5168\u6027\u306f\u9ad8\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<p>\u3068\u3044\u3046\u3053\u3068\u3060\u305d\u3046\u3067\u3059\u3002<br \/>\n\u4eca\u307e\u3067\u306f\u3001\u5e74\u9593\u3067\u6570\u4e07\uff5e\u6570\u5341\u4e07\u306e\u6841\u3067\u304a\u91d1\u304c\u5439\u3063\u98db\u3073\u307e\u3057\u305f\u304b\u3089\u306d....<br \/>\n\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u304a\u304b\u3052\u3067\u3044\u308d\u3093\u306aweb\u30b5\u30fc\u30d3\u30b9\u304c\u7acb\u3061\u4e0a\u304c\u308a\u30b5\u30fc\u30d3\u30b9\u3092\u5b89\u5168\u306b\u5229\u7528\u3067\u304d\u308b\u4ed5\u7d44\u307f\u304c\u51fa\u6765\u4e0a\u304c\u3063\u305f\u308f\u3051\u3067\u3059\u304c\u3001\u3044\u304b\u3093\u305b\u3093\u5c0e\u5165\u3059\u308b\u306e\u306b \u306f\uff1f \u3068\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3082\u4e8b\u5b9f\u3067\u3059\u3002<br \/>\n\u305d\u308c\u3067\u306f\u3001\u5b9f\u969b\u306b\u69cb\u7bc9\u624b\u9806\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002  <\/p>\n<h2>\u306a\u306b\u306f\u3068\u3082\u3042\u308cNginx\u3092\u5165\u308c\u308b\u3002<\/h2>\n<pre><code>vi \/etc\/yum.repo.d\/nginx.repo  \n\n[nginx]  \nname=nginx repo  \nbaseurl=http:\/\/nginx.org\/packages\/centos\/$releasever\/$basearch\/  \ngpgcheck=0  \nenabled=1  <\/code><\/pre>\n<pre><code>root@localhost ~# yum -y install nginx  <\/code><\/pre>\n<p>  <\/p>\n<h2>Let's Encrypt\u306b\u3088\u308bssl\u8a3c\u660e\u66f8\u767a\u884c<\/h2>\n<p>\u6b21\u306b\u3001certbot \u3068\u547c\u3070\u308c\u308b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30bd\u30d5\u30c8\u3092\u5229\u7528\u3057nginx\u306b\u5bfe\u3057\u3066ssl\u8a3c\u660e\u3092\u767a\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002  <\/p>\n<pre><code>root@localhost ~# yum -y install certbot-nginx  <\/code><\/pre>\n<pre><code>root@localhost ~# certbot \u2013nginx -d example.com (\uff0aexample.com\u306f\u30b5\u30f3\u30d7\u30eb\u3067\u3059)  <\/code><\/pre>\n<p>\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u3068\u4e0b\u56f3\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/50412908-7b437300-084e-11e9-9654-680c4e7715c1.png\" alt=\"image\" \/><\/p>\n<p>\n\u3053\u3053\u3067\u306f\u3001\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u767b\u9332\u3059\u308b \u3001 C\u5358\u4f53\u3092\u62bc\u3059\u3068 cancel\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u51e6\u7406\u304c\u6b62\u307e\u308b\u306e\u3067\u6ce8\u610f\u3059\u308b\u3053\u3068\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/50412948-b80f6a00-084e-11e9-8f3d-24fd9ff2b6a5.png\" alt=\"image\" \/><\/p>\n<p>\n\u6b21\u306b\u3001\u5229\u7528\u898f\u7d04\u306b\u540c\u610f\u3059\u308b\u304b\u3069\u3046\u304b\u805e\u3044\u3066\u304f\u308b\u306e\u3067(A) Agree\u3092\u5165\u529b<\/p>\n<p>\n<img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/50412988-f3119d80-084e-11e9-958d-f294504522cc.png\" alt=\"image\" \/><\/p>\n<p>\n\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u305f\u3068\u304d\u306b\u60c5\u5831\u3092Let's Encrypt\u5074\u306b\u63d0\u51fa\u3059\u308b\u304b\u3069\u3046\u304b\u805e\u3044\u3066\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306f (N) No \u3092\u5165\u529b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\n<img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/50413010-22280f00-084f-11e9-904c-f4e0ce38ca3b.png\" alt=\"image\" \/><\/p>\n<p>\n\u6b21\u306b\u3001http \u306eurl \u3092 https\u306e\u65b0\u3057\u3044url\u306b\u30a2\u30af\u30bb\u30b9\u3092\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u304b\u805e\u3044\u3066\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3053\u306f\u3001[1] \u3092\u9078\u629e\u3057\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092yes\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\n<img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/50413033-5996bb80-084f-11e9-8934-bd3ec5cce316.png\" alt=\"image\" \/><\/p>\n<p>\n\u6700\u5f8c\u306b\u3053\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u51fa\u308c\u3070ssl\u8a3c\u660e\u66f8\u306f\u7121\u4e8b\u767a\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u898b\u3066\u306e\u3068\u304a\u308a\u3067\u3059\u304c\u3001\u753b\u50cf\u5de6\u4e0a\u306e\u3068\u3053\u308d\u306b -Congratulations! \u3068\u51fa\u3066\u307e\u3059\u306d\uff1f<\/p>\n<h2>Let's Encrypt\u3092\u534a\u6c38\u4e45\u7684\u306b\u4f7f\u3046<\/h2>\n<p>\u305b\u3063\u304b\u304f\u30bf\u30c0\u306essl\u3067\u3059\u3002<br \/>\n\u305d\u308c\u306a\u3089\u534a\u6c38\u4e45\u7684\u306b\u4f7f\u3044\u307e\u3057\u3087\u3046\u3068\u3044\u3046\u3053\u3068\u3067\u3001linux\u6a19\u6e96\u88c5\u5099\u306e cron\u3000\u3092\u5229\u7528\u3057\u51e6\u7406\u3092\u534a\u6c38\u4e45\u7684\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre><code>root@localhost ~# crontab -e  <\/code><\/pre>\n<p>\u6700\u521d\u306b\u3001crontab\u3092\u5b9f\u884c\u3059\u308b\u3068\u5b9f\u884c\u3057\u305f\u5148\u306f\u4f55\u3082\u66f8\u304b\u308c\u3066\u3044\u306a\u3044\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/23439178\/50413141-6962cf80-0850-11e9-8f9c-8c9123f27b9f.png\" alt=\"image\" \/>  <\/p>\n<p>insert\u3067\u7de8\u96c6\u53ef\u80fd\u306b\u3057\u3066\u3001\u5b9a\u6642\u30c1\u30a7\u30c3\u30af\u3059\u308b\u65e5\u6642\u3092\u6c7a\u3081\u307e\u3059\u3002<br \/>\n\u79c1\u306e\u5834\u5408\u306f\u300130 2 <em> <\/em> * \/usr\/bin\/cerbot renew --quiet \u3068\u66f8\u304d\u6bce\u65e5\u5348\u524d2:30(\u6df1\u591c)\u306b\u66f4\u65b0\u3092\u884c\u3046\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2>WordPress\u4f7f\u3063\u3066\u308b\u5834\u5408<\/h2>\n<p>WordPress \u306f\u521d\u671f\u3067http\u901a\u4fe1\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u305f\u3081\u3001https\u5316\u3057\u305fweb\u30b5\u30fc\u30d0\u3092reboot\u3057\u3066\u3057\u307e\u3046\u3068wordpress\u5074\u306f\u3001https\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u2191\u3053\u308c\u3092\u3084\u3089\u304b\u3057\u307e\u3057\u3066\u3001\u4e00\u6642\u7684\u306bwordpress\u304c\u8868\u793a\u3055\u308c\u306a\u304f\u306a\u3063\u305f\u3068\u304d\u306f\u30d3\u30d3\u308a\u307e\u3057\u305f\u3002(\u7b11)<\/p>\n<p>\n\u305d\u3053\u3067\u3001certbot \u2013nginx -d example.com (\uff0aexample.com\u306f\u30b5\u30f3\u30d7\u30eb\u3067\u3059)  \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u305f\u5f8c\u3001\u6b63\u5e38\u306bssl\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3067\u304d\u305f\u5834\u5408wordpress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3 &quot; Really Simple SSL &quot;\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3057\u3001\u4e00\u62ec\u3067https\u5316\u3059\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>SSL\u8a3c\u660e\u66f8\u3092\u53d6\u3063\u3066\u3001url\u3092https\u5316\u305b\u305a\u306breboot\u3057\u3066\u3057\u307e\u3063\u305f\u5834\u5408<\/h2>\n<p>\u5927\u4e08\u592b\u3067\u3059\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u3001ssh\u304c\u3064\u306a\u304c\u308c\u3070\u4f55\u3068\u304b\u306a\u308a\u307e\u3059\u304b\u3089\u3002<\/p>\n<pre><code>root@localhost ~# certbot revoke --cert-path=\/etc\/letsencrypt\/live\/\u30c9\u30e1\u30a4\u30f3\u540d\/cert.pem  <\/code><\/pre>\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u3055\u3089\u306b\u3001vi \/etc\/nginx\/conf.d\/\u8a2d\u5b9aconf\u3082\u66f8\u304d\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001ssl\u306b\u8a72\u5f53\u3059\u308b\u8ffd\u8a18\u7b87\u6240\u3092\u6d88\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u6d88\u3057\u305f\u5f8c\u306f\u3001nginx -t\u3067\u6587\u6cd5\u30c1\u30a7\u30c3\u30af\u3092\u5fd8\u308c\u305a\u306b\u3002<\/p>\n<p>\n\u3067\u306f\u3001Let's Enjoy for Free SSL !!  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3082\u3069\u3082\u3001\u30d4\u30f3\u6751\u3067\u3059\u3002 2019\u5e74\u307e\u3067\u3042\u3068\u5c11\u3057\u3068\u3044\u3046\u3068\u3053\u308d\u3067\u3059\u304c\u30012018\u5e74\u5185\u306bhttps\u306e\u5c0e\u5165\u3092\u81ea\u5206\u3067\u3067\u304d\u306a\u3044\u3063\u3066\u3044\u3046\u306e\u306f\u4f55\u304b\u4eca\u307e\u3067linux\u4f7f\u3063\u3066\u3044\u308d\u3093\u306a\u3053\u3068\u3084\u3063\u3066\u304d\u307e\u3057\u305f\u304c &quot;\u3048\u3047\uff5e\u3001SSL\u5316\u3059\u3089\u3067\u304d\u306a\u3044&hellip; <span class=\"clear\"><\/span><a href=\"https:\/\/blog.yukiafronia.com\/?p=49\" class=\"more-link read-more\" rel=\"bookmark\"><span class=\"screen-reader-text\">Let\u2019s Encrypt \u5c0e\u5165\u624b\u5f15\u304d<\/span><i class=\"fa fa-arrow-right\"><\/i> \u306e\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":50,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49"}],"version-history":[{"count":1,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":51,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions\/51"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=\/wp\/v2\/media\/50"}],"wp:attachment":[{"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yukiafronia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}