{"id":1711,"date":"2017-12-13T15:58:41","date_gmt":"2017-12-13T06:58:41","guid":{"rendered":"https:\/\/adan.jp.net\/blog\/?p=1711"},"modified":"2019-08-29T14:23:58","modified_gmt":"2019-08-29T05:23:58","slug":"centos7%e3%81%aeapache2-4%e3%81%abssl%e3%81%ae%e8%a8%ad%e5%ae%9a%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%82https%e3%81%ae%e3%81%bf%e3%81%a7web%e3%82%92%e4%bd%9c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/adan.jp.net\/blog\/programing\/1711","title":{"rendered":"SSL(https)\u306e\u8a2d\u5b9aCentOS7\u306eApache2.4\u7de8-https\u901a\u4fe1\u306e\u307f\u3067Web\u3092\u4f5c\u308b-"},"content":{"rendered":"<p>RapidSSL\u8a3c\u660e\u66f8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u3068\u304f\u306bRapidSSL\u3058\u3083\u306a\u304f\u3066\u3082OK\u3067\u3059\u3002<br \/>\nFujiSSL\u3067\u3082\u4e0b\u8a18\u624b\u9806\u3067\u3001https\u74b0\u5883\u3092\u4f5c\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u4e0b\u6e96\u5099\u3067\u3059\u3001mod_ssl \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre><code># yum -y install mod_ssl<\/code><\/pre>\n<h2 class=\"hh hh21\" id=\"i-0\">\u8a3c\u660e\u66f8\u767a\u884c\u3092\u7533\u3057\u8fbc\u3080\u70ba\u306eCSR\u9020\u308a<\/h2>\n<p>\u307e\u305a\u306f\u79d8\u5bc6\u9375\u3092\u751f\u6210\u3059\u308b\u3002<br \/>\nRapidSSL\u307e\u305f\u306fFujiSSL\u306e\u8a8d\u8a3c\u66f8\u304c 2048bit \u306a\u306e\u3067 2048 \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3002<\/p>\n<pre><code># cd \/etc\/pki\/tls\/certs\/\n# openssl genrsa -des3 -out server.key 2048\n<\/code><\/pre>\n<p>\u6b21\u306b\u79d8\u5bc6\u9375\u304b\u3089 CSR \u3092\u751f\u6210\u3059\u308b\u3002<\/p>\n<pre><code># openssl req -new -key server.key -out server.csr\n\nCountry Name (2 letter code) [GB]:JP \uff08\u2190\u56fd\u540d\u3092\u5165\u529b\uff09\nState or Province Name (full name) [Berkshire]:Tokyo \uff08\u2190\u90fd\u9053\u5e9c\u770c\u3092\u5165\u529b\uff09\nLocality Name (eg, city) [Newbury]:Minato-ku \uff08\u2190\u5e02\u533a\u753a\u6751\u3092\u5165\u529b\uff09\nOrganization Name (eg, company) [My Company Ltd]:Adan Inc \uff08\u2190\u4f1a\u793e\u3001\u56e3\u4f53\u540d\u3092\u5165\u529b\uff09\nOrganizational Unit Name (eg, section) []: \uff08\u2190\u7a7a\u30a8\u30f3\u30bf\u30fc\uff09\nCommon Name (eg, your name or your server's hostname) []:www.example.com \uff08\u2190\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u5165\u529b\uff09\nEmail Address []:webmaster@example.com \uff08\u2190\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\uff09\n\nPlease enter the following 'extra' attributes\nto be sent with your certificate request\nA challenge password []: \uff08\u2190\u7a7a\u30a8\u30f3\u30bf\u30fc\uff09\nAn optional company name []: \uff08\u2190\u7a7a\u30a8\u30f3\u30bf\u30fc\uff09\n<\/code><\/pre>\n<p>CSR \u306e\u5185\u5bb9\u3092\u78ba\u8a8d\u3002<\/p>\n<pre><code># cat server.csr<\/code><\/pre>\n<p>CSR \u3092 Rapid-SSL.jp \u306b\u9001\u4fe1\u3057\u3066\u3001\u8a3c\u660e\u66f8\u767a\u884c\u3092\u7533\u3057\u8fbc\u3080\u3002<br \/>\nCSR \u751f\u6210\u6642\u306b\u5165\u529b\u3057\u305f\u60c5\u5831\u3092 Rapid-SSL.jp \u3067\u3082\u5165\u529b\u3059\u308b\u3053\u3068\u3002<br \/>\n\u30e1\u30fc\u30eb\u8a8d\u8a3c\u5f8c\u3001SSL \u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u304c\u30e1\u30fc\u30eb\u3067\u9001\u3089\u308c\u3066\u304f\u308b\u306e\u3067\u3001<br \/>\n\u30b5\u30fc\u30d0\u30fc\u306b\u8a2d\u7f6e\u3059\u308b\u3002<\/p>\n<p>SSL \u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u3092\u30b3\u30d4\u30da\u3059\u308b<\/p>\n<pre><code># vi server.crt<\/code><\/pre>\n<p>\u3053\u306e\u307e\u307e\u3060\u3068 Apache \u3092\u8d77\u52d5\u3059\u308b\u305f\u3073\uff08\uff1f\uff09\u306b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u805e\u304b\u308c\u308b\u306e\u3067\u3001<br \/>\n\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u5fdc\u7b54\u3092\u524a\u9664\u3059\u308b\u3002<\/p>\n<pre><code># openssl rsa -in server.key -out server.key<\/code><\/pre>\n<p>ssl.conf \u3092\u7de8\u96c6\u3059\u308b\u3002<\/p>\n<p>Apache \u3092\u518d\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<p>\u25a0\u4e2d\u9593CA\u8a3c\u660e\u66f8\u3068\u30af\u30ed\u30b9\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8<br \/>\nApache\u306e\u5834\u5408\u306f\u3001\u4e2d\u9593CA\u8a3c\u660e\u66f8\u3068\u30af\u30ed\u30b9\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u3092\u3072\u3068\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u307e\u3068\u3081\u305fApache\u30d0\u30f3\u30c9\u30eb\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>\u300cchain.crt\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u4f5c\u6210<br \/>\n\u203b\u4e2d\u9593CA\u8a3c\u660e\u66f8\u3092\u4e0a\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u4e0b\u3055\u3044\u3002<br \/>\n\u203b\u30af\u30ed\u30b9\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u3092\u4e0b\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>cd \/etc\/pki\/tls\/certs\/<br \/>\n\u4e0a\u8a18\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u308f\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u914d\u7f6e\u3059\u308b<\/p>\n<p>Apache\u306eSSL\u306e\u30b3\u30f3\u30d5\u30d5\u30a1\u30a4\u30eb\u306b\u4e0b\u8a18\u3092\u8ffd\u52a0<br \/>\nSSLCertificateChainFile \u201c\/etc\/pki\/tls\/certs\/chain.crt\u201d<\/p>\n<p>Apache\u518d\u8d77\u52d5<br \/>\n\u203brestart\u3067\u306f\u3001\u6b63\u5e38\u306b\u8aad\u307f\u8fbc\u307e\u308c\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3001stop\u3001start\u30b3\u30de\u30f3\u30c9\u3067\u3002<\/p>\n<p>\u4e0b\u8a18URL\u3067\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u308b<br \/>\nhttps:\/\/ssltools.geotrust.com\/checker\/views\/certCheck.jsp<\/p>\n<p>SSLCertificateFile \u201c\/etc\/pki\/tls\/certs\/hoiku\/server.crt\u201d<br \/>\nSSLCertificateChainFile \u201c\/etc\/pki\/tls\/certs\/hoiku\/chain.crt\u201d<br \/>\nSSLCertificateKeyFile \u201c\/etc\/pki\/tls\/certs\/hoiku\/server.key\u201d<\/p>\n<hr><div class='adan_banner'>\n<a href='\/contact'><img src='\/blog\/wp-content\/uploads\/2019\/02\/bosyu_banner.jpeg'><\/a>\n<\/div>  <div class=\"sng-box box26\"><div class=\"box-title\">\u30d7\u30ed\u306b\u805e\u3044\u3066\u307f\u308b<\/div><div class=\"box-content\">\u682a\u5f0f\u4f1a\u793eadan\u306f\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30ad\u30e3\u30ea\u30a2\u306b\u771f\u5263\u306b\u5411\u304d\u5408\u3063\u3066\u3044\u307e\u3059\u3002<br>\n<strong class='keiko_blue'>\u4f01\u696d\u306e\u60c5\u5831<\/strong>\u3084<strong class='keiko_blue'>\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u30ad\u30e3\u30ea\u30a2\u30a2\u30c3\u30d7<\/strong>\u306e\u65b9\u6cd5\u3001<strong class='keiko_blue'>\u73fe\u5728\u306e\u5f85\u9047\uff08\u7d66\u6599\u30fb\u5831\u916c\uff09<\/strong>\u3001<strong class='keiko_blue'>\u672a\u7d4c\u9a13\u304b\u3089\u306e\u30b9\u30c6\u30c3\u30d7\u30a2\u30c3\u30d7\u65b9\u6cd5<\/strong>\u306a\u3069\u306e\u3054\u76f8\u8ac7\u3092\u53d7\u3051\u4ed8\u3051\u3066\u3044\u307e\u3059\u3002<br>\n\u304a\u6c17\u8efd\u306b\u304a\u554f\u5408\u305b\u304f\u3060\u3055\u3044\u3002<div class=\"center\"><p>  <a href=\"\/contact\" class=\"btn raised accent-bc strong\">\u304a\u554f\u5408\u305b\u306f\u3053\u3061\u3089<\/a><\/p><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>RapidSSL\u8a3c\u660e\u66f8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u3068\u304f\u306bRapidSSL\u3058\u3083\u306a\u304f\u3066\u3082OK\u3067\u3059\u3002 FujiSSL\u3067\u3082\u4e0b\u8a18\u624b\u9806\u3067\u3001https\u74b0\u5883\u3092\u4f5c\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f\u3002 \u307e\u305a\u4e0b\u6e96\u5099\u3067\u3059\u3001mod_ssl \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002 # yum -y &#8230; <\/p>\n","protected":false},"author":2,"featured_media":1714,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"class_list":{"0":"post-1711","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing"},"_links":{"self":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/1711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/comments?post=1711"}],"version-history":[{"count":7,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/1711\/revisions"}],"predecessor-version":[{"id":2310,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/posts\/1711\/revisions\/2310"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/media\/1714"}],"wp:attachment":[{"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/media?parent=1711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/categories?post=1711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adan.jp.net\/blog\/wp-json\/wp\/v2\/tags?post=1711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}