{"id":1492,"date":"2020-02-28T11:22:09","date_gmt":"2020-02-28T02:22:09","guid":{"rendered":"https:\/\/qol-kk.com\/wp2\/?p=1492"},"modified":"2020-03-13T14:34:07","modified_gmt":"2020-03-13T05:34:07","slug":"post-1492","status":"publish","type":"post","link":"https:\/\/qol-kk.com\/wp2\/blog\/2020\/02\/28\/post-1492\/","title":{"rendered":"DEMO\u30b5\u30fc\u30d0\u30fc\u306bSSL\u3092\u8a2d\u5b9a\u3057\u305f\u306e\u3067\u6b21\u56de\u697d\u306b\u306a\u308b\u70ba\u306e\u30e1\u30e2 \u305d\u306e2"},"content":{"rendered":"<h2>DEMO\u30b5\u30fc\u30d0\u30fc\u306bSSL\u3092\u8a2d\u5b9a\u3057\u305f\u306e\u3067\u6b21\u56de\u697d\u306b\u306a\u308b\u70ba\u306e\u30e1\u30e2 \u305d\u306e2<\/h2>\n<p>SSL\u5316\u306e\u3084\u308b\u4e8b\u30ea\u30b9\u30c8\u30021\uff5e3\u306f<a href=\"https:\/\/qol-kk.com\/wp2\/blog\/2020\/02\/03\/post-1482\/\">\u4ee5\u524d\u306e\u8a18\u4e8b<\/a>\u30679\uff5e18\u306f<a href=\"https:\/\/qol-kk.com\/wp2\/blog\/2020\/03\/13\/post-1566\/\">\u3053\u3061\u3089\u304b\u3089<\/a>\u3069\u3046\u305d<\/p>\n<div class=\"paperBox\">\n<ol>\n<li><s>mod_ssl\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/s><\/li>\n<li><s>OpenSSL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/s><\/li>\n<li><s>openssl.cnf\u3067\u8a3c\u660e\u66f8\u671f\u9593\u306e\u8a2d\u5b9a\u3092\u884c\u3046<\/s><\/li>\n<li><strong>\u4e71\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/strong><\/li>\n<li><strong>\u79d8\u5bc6\u9375\u306e\u4f5c\u6210<\/strong><\/li>\n<li><strong>CSR\u306e\u4f5c\u6210<\/strong><\/li>\n<li><strong>SSL\u8a3c\u660e\u66f8\u306e\u767a\u884c\u624b\u7d9a\u304d(\u7533\u3057\u8fbc\u307f)<\/strong><\/li>\n<li><strong>\u8a3c\u660e\u66f8\u767a\u884c\u3092\u5f85\u3064\u203b\u8a8d\u8a3c\u5c40\u3084\u30b5\u30fc\u30d3\u30b9\u306b\u3088\u3063\u3066\u5373\u65e5\uff5e\u6570\u9031\u9593\u304b\u304b\u308b\u3082\u306e\u307e\u3067\u3042\u308b<\/strong><\/li>\n<li>\u767a\u884c\u3055\u308c\u305f\u8a3c\u660e\u66f8\u3092DL<\/li>\n<li>\u4e2d\u9593\u8a3c\u660e\u3082DL<\/li>\n<li>\u30b5\u30fc\u30d0\u30fc\u306b\u8a3c\u660e\u66f8\u3092\u914d\u7f6e<\/li>\n<li>\/etc\/httpd\/conf.d\/ssl.conf \u306b\u8a3c\u660e\u66f8\uff06Key\u306e\u5834\u6240\u3092\u6307\u793a<\/li>\n<li>\/etc\/httpd\/conf\/httpd.conf \u306b ssl.conf\u306e\u8aad\u8fbc\u3092\u6307\u793a<\/li>\n<li>sudo systemctl restart httpd\u00a0 (Apache\u518d\u8d77\u52d5)\u3092\u5b9f\u884c\u3057\u3066SSL\u306e\u7a3c\u50cd\u3092\u78ba\u8a8d\u203bhttps:\/\/\u3067\u5b9f\u969b\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u308b<\/li>\n<li>80\u756a\u30dd\u30fc\u30c8\u21d2443\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3092\u8a2d\u5b9a\u3059\u308b<\/li>\n<li>\u30d7\u30ed\u30b0\u30e9\u30e0\u5074\u306e\u8a2d\u5b9a\uff08\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u3084 http:\/\/\u3067\u7d44\u3093\u3067\u3044\u308b\u30d1\u30fc\u30c4\u7b49\uff09\u3092\u6539\u4fee\u3059\u308b<\/li>\n<li>Apache\u518d\u8d77\u52d5\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u6c42\u3081\u3089\u308c\u306a\u3044\u69d8\u306b\u8a2d\u5b9a\u3059\u308b\u203b\u30b5\u30fc\u30d0\u30fc\u518d\u8d77\u52d5\u3067\u305d\u306e\u307e\u307e\u7acb\u3061\u4e0a\u304c\u308b\u3088\u3046\u306b\u3002<\/li>\n<li>sudo systemctl restart httpd\u00a0 (Apache\u518d\u8d77\u52d5) \u3067\u8a2d\u5b9a\u5b8c\u4e86<\/li>\n<\/ol>\n<\/div>\n<p>\u4eca\u56de\u306f\u9805\u76ee4\uff5e7\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n<h3>\u4e71\u6570\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h3>\n<p>\u524d\u56de\u307e\u3067\u306e\u5de5\u7a0b\u3067OpenSSL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u306e\u3067\u4e71\u6570\u3092\u6253\u3061\u51fa\u3059\u306e\u306f\u7c21\u5358\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">$ openssl rand -base64 10\r\n\r\n#\u4e71\u6570\u7d50\u679c\r\nv4O9DmdtNiKjfw==<\/pre>\n<p>-base64 \u3067\u9032\u6570\u3092\u300110\u306f\u30d0\u30a4\u30c8\u6570\u3092\u8868\u3057\u307e\u3059\u3002<br \/>\n10\u309220\u3068\u3059\u308c\u3070\u3088\u308a\u8907\u96d1\u306a(\u9577\u3044)\u4e71\u6570\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">#\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4f5c\u6210 \r\n$ cd \/etc\/httpd\/conf \r\n$ mkdir ssl.key \r\n$ cd ssl.key\r\n\r\n#\u4e71\u6570\u306e\u51fa\u529b\r\n$ openssl rand -base64 10 &gt; {\u30d5\u30a1\u30a4\u30eb\u540d}<\/pre>\n<p>\u3053\u308c\u3067\u4f5c\u6210\u3057\u305f\u4e71\u6570\u3092{\u30d5\u30a1\u30a4\u30eb\u540d}\u3067\u6307\u793a\u3055\u308c\u305f\u540d\u524d\u3067\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u4e71\u6570\u306f\u5f8c\u3005Apache\u518d\u8d77\u52d5\u306e\u8a8d\u8a3c\u81ea\u52d5\u5316\u3067\u4f7f\u7528\u3059\u308b\u306e\u3067\u64cd\u4f5c\u65b9\u6cd5\u3060\u3051\u8a18\u61b6\u3057\u3068\u304d\u307e\u3059\u3002<br \/>\n\u8a73\u7d30\u306f<a href=\"https:\/\/qiita.com\/yoshizaki_kkgk\/items\/26b01edb577861fbcfe6\">\u3053\u3061\u3089<\/a>\u3092\u53c2\u7167\u3057\u3066\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002<\/p>\n<h3>\u79d8\u5bc6\u9375\u306e\u4f5c\u6210<\/h3>\n<pre class=\"lang:default decode:true\">#\u79d8\u5bc6\u9375\u306e\u4f5c\u6210  \r\n$ openssl genrsa -des3 -out server.key 2048\r\n\r\nEnter pass phrase for server.key: (\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3001Apache\u8d77\u52d5\u3059\u308b\u305f\u3073\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u78ba\u8a8d\u3057\u307e\u3059)  \r\nVerifying - Enter pass phrase for server.key: (\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u518d\u78ba\u8a8d)<\/pre>\n<p>\u3053\u3053\u3067\u767b\u9332\u3059\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u518d\u8d77\u52d5\u6642\u306b\u6bce\u56de\u805e\u304b\u308c\u307e\u3059\u3002<br \/>\n\u5148\u7a0b\u306e\u4e71\u6570\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u305d\u306e\u5024\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u306b\u51fa\u529b\u3057\u3066\u304a\u3051\u3070\u5fd8\u308c\u305f\u6642\u306e\u4e88\u9632\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u79d8\u5bc6\u9375\u304c\u767a\u884c\u3055\u308c\u305f\u304b\u5426\u304b\u306f ls \u3067\u306e\u5b58\u5728\u78ba\u8a8d\u3067\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">#\u9375\u3092\u767a\u884c\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u5185 \/etc\/httpd\/conf\/ssl.key \u3067\u5b9f\u884c\r\n$ ls\r\n\r\n#\u4e0b\u306e\u69d8\u306b\u5e30\u3063\u3066\u304f\u308c\u3070OK\r\nserver.key<\/pre>\n<h3>CSR\u306e\u4f5c\u6210<\/h3>\n<p>CSR\u306f\u6b21\u5de5\u7a0b\u306e\u8a3c\u660e\u66f8\u767a\u884c\u624b\u7d9a\u304d\u3067\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u4fdd\u7ba1\u7528\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">$ cd \/etc\/httpd\/conf\r\n$ sudo mkdir ssl.csr<\/pre>\n<p>openssl \u306bCSR\u306e\u4f5c\u6210\u3092\u6307\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">$ openssl req -new -key ssl.key\/server.key -out ssl.csr\/server.csr\r\n\r\n# \u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u6c42\u3081\u3089\u308c\u307e\u3059\r\nEnter pass phrase for ssl.key\/server.key: \/\/\u79d8\u5bc6\u9375\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\r\n\r\n#\u8cea\u554f\u306b\u7b54\u3048\u307e\u3059\r\n-----\r\nCountry Name (2 letter code) [XX]: \/\/\u56fd\u540d\r\nState or Province Name (full name) []: \/\/\u90fd\u9053\u5e9c\u770c\r\nLocality Name (eg, city) [Default City]: \/\/\/\u5e02\u753a\u6751\r\nOrganization Name (eg, company) [Default Company Ltd]: \/\/\u7d44\u7e54\u540d\r\nOrganizational Unit Name (eg, section) []: \/\/\u90e8\u7f72\u540d\uff08\u7a7a\u767d\u3067OK\uff09\r\nCommon Name (eg, your name or your server hostname) []: \/\/\u30c9\u30e1\u30a4\u30f3\u540d\u203b\u6ce8\u610f\r\nEmail Address []: \/\/\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\r\n\r\nA challenge password []: \/\/\uff08\u7a7a\u767d\u3067OK\uff09\r\nAn optional company name []: \/\/\uff08\u7a7a\u767d\u3067OK\uff09<\/pre>\n<p>\u30c9\u30e1\u30a4\u30f3\u540d\u306e\u767b\u9332\u306b\u306f\u6ce8\u610f\u4e8b\u9805\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"exclamationBox\">\n<p style=\"text-align: left;\">\u30b5\u30a4\u30c8URL\u306bwww\u3092\u5165\u308c\u308b\u304b\u5426\u304b<\/p>\n<\/div>\n<p>\u79c1\u306f\u57fa\u672c\u7684\u306bwww\u3092\u5165\u308c\u307e\u305b\u3093\u304c\u3001\u5fc5\u8981\u3068\u601d\u3046\u65b9\u306f\u3010www.\u30c9\u30e1\u30a4\u30f3\u540d\u3011\u3067\u7533\u8acb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>SSL\u8a3c\u660e\u66f8\u306e\u767a\u884c\u624b\u7d9a\u304d(\u7533\u3057\u8fbc\u307f)<\/h3>\n<p>\u767a\u884c\u624b\u7d9a\u304d\u306f\u5404\u30b5\u30fc\u30d0\u30fc\u4f1a\u793e\u3055\u3093\u304c\u4ef2\u4ecb\u3057\u3066\u884c\u3063\u3066\u9802\u3051\u308b\u4e8b\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u5176\u3005\u306e\u624b\u7d9a\u304d\u3092\u78ba\u8a8d\u3057\u7533\u3057\u8fbc\u307f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u8a3c\u660e\u66f8\u767a\u884c\u3092\u5f85\u3064<\/h3>\n<p>\u7533\u3057\u8fbc\u307f\u304b\u3089\u3059\u3050\u306b\u767a\u884c\u3057\u3066\u304f\u308c\u308bSSL\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u6642\u9593\u306e\u304b\u304b\u308b\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u5f85\u3064\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3>\u307e\u3068\u3081<\/h3>\n<p>\u4ee5\u4e0a\u3001\u8a3c\u660e\u66f8\u306e\u767a\u884c\u307e\u3067\u306e\u624b\u7d9a\u304d\u3067\u3057\u305f\u3002<\/p>\n<p>\u95a2\u9023\u8a18\u4e8b\uff1a\u3010<a href=\"https:\/\/qol-kk.com\/wp2\/blog\/2020\/02\/03\/post-1482\/\">\u5de5\u7a0b\uff1a1\uff5e3<\/a>\u3011\/\u3010<a href=\"https:\/\/qol-kk.com\/wp2\/blog\/2020\/03\/13\/post-1566\/\">\u5de5\u7a0b\uff1a9\uff5e18<\/a>\u3011<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DEMO\u30b5\u30fc\u30d0\u30fc\u306bSSL\u3092\u8a2d\u5b9a\u3057\u305f\u306e\u3067\u6b21\u56de\u697d\u306b\u306a\u308b\u70ba\u306e\u30e1\u30e2 \u305d\u306e2 SSL\u5316\u306e\u3084\u308b\u4e8b\u30ea\u30b9\u30c8\u30021\uff5e3\u306f\u4ee5\u524d\u306e\u8a18\u4e8b\u30679\uff5e18\u306f\u3053\u3061\u3089\u304b\u3089\u3069\u3046\u305d mod_ssl\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb OpenSSL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb openssl.cn [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":50,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[17],"tags":[54,153,98,496,497,49,45],"class_list":["post-1492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-soliloquy","tag-html","tag-laravel","tag-php","tag-ssl","tag-497","tag-49","tag-45"],"veu_head_title_object":{"title":"","add_site_title":""},"jetpack_publicize_connections":[],"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qol-kk.com\/wp2\/wp-content\/uploads\/2018\/08\/interface3.jpg","_links":{"self":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/comments?post=1492"}],"version-history":[{"count":0,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/posts\/1492\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media\/50"}],"wp:attachment":[{"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/media?parent=1492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/categories?post=1492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qol-kk.com\/wp2\/wp-json\/wp\/v2\/tags?post=1492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}