{"id":444,"date":"2017-02-21T02:21:41","date_gmt":"2017-02-20T17:21:41","guid":{"rendered":"https:\/\/knowhow.hirohiro716.com\/?p=444"},"modified":"2022-03-07T16:24:16","modified_gmt":"2022-03-07T07:24:16","slug":"centos7%e3%81%a7%e3%81%aeletsencrypt%e8%a8%bc%e6%98%8e%e6%9b%b8%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/weblog.hirohiro716.com\/?p=444","title":{"rendered":"CentOS7\u3067\u306eLet&#8217;sEncrypt\u8a3c\u660e\u66f8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p style=\"margin-bottom:2em;\">\nApache\u3001OpenSSL\u3001ModSSL\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u524d\u63d0\u3067\u3059\u3002\n<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ cd \/opt\/\r\n<\/pre>\n<p>git\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u53d6\u5f97\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# git clone https:\/\/github.com\/letsencrypt\/letsencrypt\r\n<\/pre>\n<p>\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3059\u308b\u3068\u5fc5\u8981\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# cd letsencrypt\r\n# .\/letsencrypt-auto --help\r\n<\/pre>\n<p>\u8a3c\u660e\u66f8\u306e\u4f5c\u6210\u3002<br \/>\n\u203b\u4e8b\u524d\u306bapache\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u505c\u6b62\u3057\u3066\u304a\u304f<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# .\/letsencrypt-auto certonly --standalone -d www.example.com\r\n<\/pre>\n<p>Apache\u306eSSL\u8a2d\u5b9a\u3002<br \/>\n\/etc\/httpd\/conf.d\/ssl.conf \u306e\u6700\u4e0b\u90e8\u306b\u4e0b\u8a18\u3092\u8ffd\u8a18\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;VirtualHost *:443&gt;\r\n    ServerName www.example.com\r\n    DocumentRoot &quot;\/var\/www\/html\/&quot;\r\n    &lt;Directory &quot;\/var\/www\/html\/&quot;&gt;\r\n        AllowOverride All\r\n    &lt;\/Directory&gt;\r\n    SSLEngine on\r\n    SSLProtocol -All +TLSv1.2\r\n    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA:!3DES:!RC4:!DH\r\n    SSLHonorCipherOrder On\r\n    SSLCertificateFile \/etc\/letsencrypt\/live\/www.example.com\/cert.pem\r\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/www.example.com\/privkey.pem\r\n    SSLCertificateChainFile \/etc\/letsencrypt\/live\/www.example.com\/chain.pem\r\n&lt;\/VirtualHost&gt;\r\n<\/pre>\n<p>\u8a3c\u660e\u66f8\u306e\u81ea\u52d5\u66f4\u65b0\u8a2d\u5b9a\u3002<br \/>\n\u66f4\u65b0\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306f\u4e0b\u8a18\u306e3\u884c\u3002<br \/>\n\u203b\u3061\u306a\u307f\u306bcertbot-auto\u306b&#8211;dry-run\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u308b\u3068\u30c6\u30b9\u30c8\u304c\u53ef\u80fd<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# \/bin\/systemctl stop httpd\r\n# \/usr\/local\/letsencrypt\/certbot-auto renew --force-renew\r\n# \/bin\/systemctl start httpd\r\n<\/pre>\n<p>\u306a\u306e\u3067crontab\u3067\u6bce\u67081\u65e5\u306e\u671d4\u6642\u306b\u66f4\u65b0\u3092\u884c\u3046\u3088\u3046\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n00 04 01 * * \/bin\/systemctl stop httpd; \/usr\/local\/letsencrypt\/certbot-auto renew --force-renew; \/bin\/systemctl start httpd\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Apache\u3001OpenSSL\u3001ModSSL\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u524d\u63d0\u3067\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3002 $ cd \/opt\/ git\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u53d6\u5f97\u3059\u308b\u3002 # git clone https:\/\/githu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-centos"],"views":1061,"_links":{"self":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=444"}],"version-history":[{"count":17,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/444\/revisions"}],"predecessor-version":[{"id":1943,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/444\/revisions\/1943"}],"wp:attachment":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}