{"id":937,"date":"2018-07-29T14:24:37","date_gmt":"2018-07-29T05:24:37","guid":{"rendered":"https:\/\/aoboshi.org\/?p=937"},"modified":"2018-09-23T18:25:14","modified_gmt":"2018-09-23T09:25:14","slug":"www-aoboshi-org%e3%82%82%e5%b8%b8%e6%99%82ssl%e5%8c%96","status":"publish","type":"post","link":"https:\/\/aoboshi.org\/?p=937","title":{"rendered":"www.aoboshi.org\u3082\u5e38\u6642SSL\u5316"},"content":{"rendered":"<p><a href=\"https:\/\/aoboshi.org\/?p=904\">\u524d\u56de\u3001Let&#8217;s encrypt\u3067\u672c\u30d6\u30ed\u30b0\u3092\u5e38\u6642SSL\u5316<\/a>\u3057\u305f\u3053\u3068\u3092\u304a\u4f1d\u3048\u3057\u307e\u3057\u305f\u304c\u3001<br \/>\n\u672c\u30d6\u30ed\u30b0\u306f\u3001<a href=\"https:\/\/aoboshi.org\">https:\/\/aoboshi.org<\/a>\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u4ed8\u304d\u306e<a href=\"https:\/\/aoboshi.org\">https:\/\/aoboshi.org<\/a>\u3067\u3082\u63a5\u7d9a\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001<\/p>\n<p><a href=\"https:\/\/aoboshi.org\">https:\/\/aoboshi.org<\/a>\u3067\u63a5\u7d9a\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001<\/p>\n<p>\u300c\u63a5\u7d9a\u3068\u3057\u3066\u3044\u308b\u30c9\u30e1\u30a4\u30f3\u3068\u8a3c\u660e\u66f8\u306e\u30c9\u30e1\u30a4\u30f3\u304c\u5408\u3063\u3066\u306a\u3044\u300d\u3068\u8b66\u544a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/aoboshi.org\/wp-content\/uploads\/2018\/07\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2018-07-29-12.42.41.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/aoboshi.org\/wp-content\/uploads\/2018\/07\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2018-07-29-12.42.41-300x91.png\" alt=\"\" width=\"300\" height=\"91\" class=\"alignnone size-medium wp-image-938\" srcset=\"https:\/\/aoboshi.org\/wp-content\/uploads\/2018\/07\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2018-07-29-12.42.41-300x91.png 300w, https:\/\/aoboshi.org\/wp-content\/uploads\/2018\/07\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2018-07-29-12.42.41-624x190.png 624w, https:\/\/aoboshi.org\/wp-content\/uploads\/2018\/07\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2018-07-29-12.42.41.png 715w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u524d\u56de\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3057\u305f\u969b\u306b\u3001aoboshi.org\u3057\u304b\u6307\u5b9a\u3057\u3066\u304a\u3089\u305a\u3001www.aoboshi.org\u3092\u6307\u5b9a\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u304c\u539f\u56e0\u306e\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u524d\u56de\u3001http\u3067\u63a5\u7d9a\u3057\u3066\u304d\u305f\u3089https\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u305f\u8a2d\u5b9a\u306b\u3001<br \/>\nwww.aoboshi.org\u3067\u63a5\u7d9a\u3057\u3066\u304d\u305f\u3089aoboshi.org\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u6761\u4ef6\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u304c\u3001<br \/>\n\/etc\/apache2\/sites-available\/wordpress.conf<\/p>\n<p>RewriteEngine On<br \/>\n    RewriteCond %{HTTPS} off<br \/>\n    RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R,L]<\/p>\n<p>\u2193\u592a\u5b57\u90e8\u5206\u3092\u8ffd\u52a0<\/p>\n<p>RewriteEngine On<br \/>\n    <strong>RewriteCond %{HTTP_HOST} ^www.aoboshi.org$ [OR]<\/strong><br \/>\n    RewriteCond %{HTTPS} off<br \/>\n    RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R,L]<\/p>\n<p>\u72b6\u614b\u306f\u5909\u308f\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001www.aoboshi.org\u7528\u306b\u8a3c\u660e\u66f8\u3092\u53d6\u308a\u76f4\u3057\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><strong>1.\u8a3c\u660e\u66f8\u53d6\u5f97<\/strong><br \/>\nwww.aoboshi.org\u7528\u306e\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305aapache\u3092\u505c\u6b62\u3002<\/p>\n<p>$ systemctl stop apache2<\/p>\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u8a3c\u660e\u66f8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>$ <strong>sudo certbot certonly &#8211;webroot -w \/var\/www\/html -d www.aoboshi.org<\/strong><br \/>\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log<br \/>\nStarting new HTTPS connection (1): acme-v01.api.letsencrypt.org<br \/>\nObtaining a new certificate<br \/>\nPerforming the following challenges:<br \/>\nhttp-01 challenge for www.aoboshi.org<br \/>\nUsing the webroot path \/var\/www\/html for all unmatched domains.<br \/>\nWaiting for verification&#8230;<br \/>\nCleaning up challenges<br \/>\nGenerating key (2048 bits): \/etc\/letsencrypt\/keys\/0001_key-certbot.pem<br \/>\nCreating CSR: \/etc\/letsencrypt\/csr\/0001_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\/www.aoboshi.org\/fullchain.pem. Your cert will<br \/>\n   expire on 2018-10-27. To obtain a new or tweaked version of this<br \/>\n   certificate in the future, simply run certbot again. To<br \/>\n   non-interactively renew *all* of your certificates, run &#8220;certbot<br \/>\n   renew&#8221;<br \/>\n &#8211; If you like Certbot, please consider supporting our work by:<\/p>\n<p>   Donating to ISRG \/ Let&#8217;s Encrypt:   https:\/\/letsencrypt.org\/donate<br \/>\n   Donating to EFF:                    https:\/\/eff.org\/donate-le<\/p>\n<p><strong>2.\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a<\/strong><br \/>\n\u524d\u56dehttps\u7528\u306b\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u3092\u8a2d\u5b9a\u3057\u305fdefault-ssl.conf\u306b\u3001www.aoboshi.org\u7528\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8\u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u30011\u30d5\u30a1\u30a4\u30eb\u306b\u6df7\u5728\u3057\u3066\u3044\u308b\u3068\u5206\u304b\u308a\u306b\u304f\u3044\u306e\u3067\u3001\u30b3\u30d4\u30fc\u3057\u3066\u8a72\u5f53\u7b87\u6240\u306e\u307f\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>www.aoboshi.org\u7528\u306bwwwdefault-ssl.conf\u3092\u4f5c\u6210<\/p>\n<p>$ pwd<br \/>\n\/etc\/apache2\/sites-available<br \/>\n$ cp -ip default-ssl.conf wwwdefault-ssl.conf<br \/>\nvi wwwdefault-ssl.conf<\/p>\n<p>ServerName\u3068SSL\u8a3c\u660e\u66f8\u306e\u7f6e\u304d\u5834\u6240\u306e\u307f\u5909\u66f4\u3059\u308b\u3002<\/p>\n<p>$ diff default-ssl.conf wwwdefault-ssl.conf<br \/>\n3c3<br \/>\n<                 ServerName aoboshi.org \n---\n>                 ServerName www.aoboshi.org<br \/>\n33,34c33,34<br \/>\n<               SSLCertificateFile      \/etc\/letsencrypt\/live\/aoboshi.org\/fullchain.pem\n<               SSLCertificateKeyFile \/etc\/letsencrypt\/live\/aoboshi.org\/privkey.pem\n---\n>                 SSLCertificateFile      \/etc\/letsencrypt\/live\/www.aoboshi.org\/fullchain.pem<br \/>\n>                 SSLCertificateKeyFile \/etc\/letsencrypt\/live\/www.aoboshi.org\/privkey.pem<br \/>\nnaoto70@wordpress-1-vm:\/etc\/apache2\/sites-available$ <\/p>\n<p>wwwdefault-ssl.conf\u3092\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<\/p>\n<p>$ <strong>sudo a2ensite wwwdefault-ssl.conf<\/strong><br \/>\nEnabling site wwwdefault-ssl.<br \/>\nTo activate the new configuration, you need to run:<br \/>\n  service apache2 reload<\/p>\n<p>\u6700\u5f8c\u306bapache\u3092\u8d77\u52d5\u3059\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p>$ systemctl start apache2<\/p>\n<p>\u3053\u308c\u3067\u3001<a href=\"https:\/\/aoboshi.org\">www.aoboshi.org<\/a>\u3067\u63a5\u7d9a\u304c\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u30102018\/9\/23\u8ffd\u8a18\u3011<\/p>\n<p>aoboshi.org\u307e\u305f\u306fwww.aoboshi.org\u4ee5\u5916\u306e\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u4ee5\u5916\u306e\u3001SSL\u8a3c\u660e\u66f8\u306e\u5b58\u5728\u3057\u306a\u3044\u5b58\u5728\u3057\u306a\u3044\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3067http:\/\/\u301c\u3092https:\/\/\u301c\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u306a\u3044\u3088\u3046\u3001wordpress.conf\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306e\u8a2d\u5b9a\u3092\u4e0b\u8a18\u306b\u66f8\u304d\u63db\u3048\u307e\u3057\u305f\u3002<br \/>\n(\u592a\u5b57\u304c\u5909\u66f4\u5834\u6240)<\/p>\n<p>RewriteEngine On<br \/>\n    RewriteCond %{HTTP_HOST} ^www.aoboshi.org$ [OR]<br \/>\n<strong>RewriteCond %{HTTP_HOST} ^aoboshi.org$<\/strong><br \/>\n    RewriteRule ^(.*)$ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R,L]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001Let&#8217;s encrypt\u3067\u672c\u30d6\u30ed\u30b0\u3092\u5e38\u6642SSL\u5316\u3057\u305f\u3053\u3068\u3092\u304a\u4f1d\u3048\u3057\u307e\u3057\u305f\u304c\u3001 \u672c\u30d6\u30ed\u30b0\u306f\u3001https:\/\/aoboshi.org\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u4ed8\u304d\u306ehttps:\/\/aoboshi.org\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,4],"tags":[],"class_list":["post-937","post","type-post","status-publish","format-standard","hentry","category-web","category-linux"],"_links":{"self":[{"href":"https:\/\/aoboshi.org\/index.php?rest_route=\/wp\/v2\/posts\/937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aoboshi.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aoboshi.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aoboshi.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aoboshi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=937"}],"version-history":[{"count":0,"href":"https:\/\/aoboshi.org\/index.php?rest_route=\/wp\/v2\/posts\/937\/revisions"}],"wp:attachment":[{"href":"https:\/\/aoboshi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aoboshi.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aoboshi.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}