{"id":1843,"date":"2016-04-17T04:40:46","date_gmt":"2016-04-16T19:40:46","guid":{"rendered":"https:\/\/ecpplus.net\/weblog\/?p=1843"},"modified":"2020-06-06T19:30:40","modified_gmt":"2020-06-06T10:30:40","slug":"nginx-%e3%81%a7-lets-encrypt-%e4%bd%bf%e3%81%86%e6%99%82%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/nginx-%e3%81%a7-lets-encrypt-%e4%bd%bf%e3%81%86%e6%99%82%e3%81%ae%e8%a8%ad%e5%ae%9a\/","title":{"rendered":"Nginx \u3067 Let&#8217;s Encrypt \u4f7f\u3046\u6642\u306e\u8a2d\u5b9a"},"content":{"rendered":"<p><a href=\"https:\/\/www.nginx.com\/blog\/free-certificates-lets-encrypt-and-nginx\/\" target=\"_blank\" rel=\"noopener noreferrer\">Using Free SSL\/TLS Certificates from Let\u2019s Encrypt with NGINX<\/a><\/p>\n<p>\u3053\u308c\u306b\u6bd4\u3079\u308b\u3068 <a href=\"https:\/\/ecpplus.net\/weblog\/lets-encrypt-on-caddy\/\">Caddy\u3092\u4f7f\u3046\u5834\u5408<\/a> \u304c\u7c21\u5358\u3059\u304e\u3066\u6ce3\u3051\u308b\u3002<\/p>\n<h3>\u8ffd\u8a18<\/h3>\n<p>\u3068\u601d\u3063\u3066\u3044\u305f\u304c\u3001 Let&#8217;s Encrypt \u306f <a href=\"https:\/\/certbot.eff.org\" target=\"_blank\" rel=\"noopener noreferrer\">Certbot<\/a> \u3067\u3082\u306e\u3059\u3054\u304f\u7c21\u5358\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<p>\u516c\u5f0f\u3092\u898b\u305f\u3089\u624b\u9806\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u3002<\/p>\n<h4>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<pre><code class=\"line-numbers\">wget https:\/\/dl.eff.org\/certbot-auto\nchmod a+x certbot-auto\n.\/certbot-auto\n<\/code><\/pre>\n<p>\u3068\u3059\u308b\u3068\u3001\u5fc5\u8981\u306a\u3082\u306e\u304c\u5168\u90e8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3002<\/p>\n<h4>\u8a3c\u660e\u66f8\u306e\u767a\u884c<\/h4>\n<p>Nginx \u306e\u5834\u5408\u3001<\/p>\n<pre><code class=\"language-bash line-numbers\">.\/path\/to\/certbot-auto certonly\n<\/code><\/pre>\n<p>\u3067\u3001\u805e\u304b\u308c\u308b\u3053\u3068\u306b\u7b54\u3048\u3066\u3044\u304f\u3068\u3001\u81ea\u52d5\u7684\u306b\u8a8d\u8a3c\u3055\u308c\u3066\u8a3c\u660e\u66f8\u304c\u767a\u884c\u3055\u308c\u308b\u3002<br \/>\n\u3053\u306e\u6642\u3001\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3059\u308b\u30c9\u30e1\u30a4\u30f3\u306e80\u756a\u30dd\u30fc\u30c8\u304c\u7a7a\u3044\u3066\u3044\u308b\u3053\u3068\u304c\u5fc5\u8981\u3067\u3001 webroot \u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u4e8b\u524d\u306b\u8abf\u3079\u3066\u304a\u304f\u3068\u826f\u3044\u3002<\/p>\n<p>\u3082\u3057\u304f\u306f\u3001Nginx\u306a\u3069\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408\u3001\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u306780\u756a\u30dd\u30fc\u30c8\u3092\u30ea\u30c3\u30b9\u30f3\u3059\u308bHTTP\u30b5\u30fc\u30d0\u306b\u306a\u3063\u3066\u8a8d\u8a3c\u3092\u3057\u3066\u304f\u308c\u308b\u6a21\u69d8\u3002<\/p>\n<pre><code class=\"language-bash line-numbers\">.\/path\/to\/certbot-auto certonly --standalone -d example.com -d www.example.com\n<\/code><\/pre>\n<p>Let&#8217;s Encrypt \u306f\u8a8d\u8a3c\u7528\u306e\u60c5\u5831\u3092\u3001\u8a3c\u660e\u66f8\u53d6\u5f97\u4e88\u5b9a\u306e\u30c9\u30e1\u30a4\u30f3\u306e80\u756a\u30dd\u30fc\u30c8\u306e\u7279\u5b9aURL\u306b\u304a\u3044\u3066\u3001Let&#8217;s Encrypt\u672c\u5bb6\u304b\u3089\u305d\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u306b\u304d\u3066\u3001\u8a8d\u8a3cOK\u3068\u306a\u3063\u305f\u3089\u8a3c\u660e\u66f8\u3092\u767a\u884c\u3057\u3066\u304f\u308c\u308b\u4ed5\u7d44\u307f\u306e\u3088\u3046\u3002<\/p>\n<h4>Nginx \u306e\u8a2d\u5b9a<\/h4>\n<p>\u4f8b\u3048\u3070\u3053\u306e ecpplus.net \u30c9\u30e1\u30a4\u30f3\u306e\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u4e0b\u8a18\u306e\u5834\u6240\u306b\u8a3c\u660e\u66f8\u304c\u51fa\u6765\u308b\u3002\uff08\u767a\u884c\u6642\u306b\u6a19\u6e96\u51fa\u529b\u3055\u308c\u3066\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u898b\u308c\u3070\u66f8\u3044\u3066\u3042\u308b)<\/p>\n<pre><code class=\"line-numbers\">server {\n        listen 443 ssl http2;\n        server_name ecpplus.net;\n\n        ssl on;\n        ssl_certificate     \/etc\/letsencrypt\/live\/ecpplus.net\/fullchain.pem;\n        ssl_certificate_key \/etc\/letsencrypt\/live\/ecpplus.net\/privkey.pem;\n...\n<\/code><\/pre>\n<h4>cron \u306e\u8a2d\u5b9a<\/h4>\n<p>\u4e00\u5fdc90\u65e5\u306e\u6709\u52b9\u671f\u9650\u304c\u3042\u308b\u304c\u3001\u6ce8\u610f\u66f8\u304d\u306b1\u65e52\u56de\u306e\u66f4\u65b0\u3067\u3001\u5206\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u3059\u308b\u3088\u3046\u306b\u3002\u3068\u3044\u3046\u306e\u304c\u304a\u3059\u3059\u3081\u3055\u308c\u3066\u308b\u306e\u3067\u3001\u305d\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u3002\u66f4\u65b0\u306e\u5fc5\u8981\u304c\u306a\u3044\u3068\u304d\u306f\u3001\u4f55\u3082\u3057\u306a\u3044\u3063\u3066\u66f8\u3044\u3066\u3042\u3063\u305f\u3002<\/p>\n<pre><code class=\"line-numbers\">21 *\/12 * * * \/usr\/local\/bin\/certbot-auto renew --quiet --no-self-upgrade\n22 *\/12 * * * \/etc\/init.d\/nginx reload\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Using Free SSL\/TLS Certificates from Let\u2019s Encrypt with NGINX \u3053\u308c\u306b\u6bd4\u3079\u308b\u3068 Caddy\u3092\u4f7f\u3046\u5834\u5408 \u304c\u7c21\u5358\u3059\u304e\u3066\u6ce3\u3051\u308b\u3002 \u8ffd\u8a18 \u3068\u601d\u3063\u3066\u3044\u305f\u304c\u3001 Let&#038;#8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2306,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[7],"class_list":["post-1843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/1843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=1843"}],"version-history":[{"count":8,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/1843\/revisions"}],"predecessor-version":[{"id":2314,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/1843\/revisions\/2314"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media\/2306"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=1843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=1843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=1843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}