質問編集履歴
4
検証用ドメインが記載されていたため、サンプルドメインに修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -114,11 +114,11 @@
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
-
SSLCertificateFile /etc/letsencrypt/live/www.
|
117
|
+
SSLCertificateFile /etc/letsencrypt/live/www.example.com/cert.pem
|
118
118
|
|
119
|
-
SSLCertificateKeyFile /etc/letsencrypt/live/www.
|
119
|
+
SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
|
120
120
|
|
121
|
-
SSLCertificateChainFile /etc/letsencrypt/live/www.
|
121
|
+
SSLCertificateChainFile /etc/letsencrypt/live/www.example.com/chain.pem
|
122
122
|
|
123
123
|
|
124
124
|
|
3
初心者アイコンにチェック
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
2
誤記の修正(sample\.com→example\.com)
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
```bash
|
2
|
-
|
3
|
-
sudo a2enmod ssl
|
4
|
-
|
5
|
-
```
|
6
|
-
|
7
1
|
お世話になります。
|
8
2
|
|
9
3
|
|
@@ -30,7 +24,7 @@
|
|
30
24
|
|
31
25
|
SSLの有効化が上手くいっておらず、デフォルトで設定されている
|
32
26
|
|
33
|
-
|
27
|
+
www.example.com発行のダミー証明書が使用されてしまいます。
|
34
28
|
|
35
29
|
|
36
30
|
|
@@ -54,13 +48,13 @@
|
|
54
48
|
|
55
49
|
```
|
56
50
|
|
57
|
-
SSLCertificateFile /etc/letsencrypt/live/
|
51
|
+
SSLCertificateFile /etc/letsencrypt/live/www.example.com/cert.pem
|
58
52
|
|
59
|
-
SSLCertificateKeyFile /etc/letsencrypt/live/
|
53
|
+
SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
|
60
54
|
|
61
|
-
SSLCertificateChainFile /etc/letsencrypt/live/
|
55
|
+
SSLCertificateChainFile /etc/letsencrypt/live/www.example.com/chain.pem
|
62
56
|
|
63
|
-
※
|
57
|
+
※www.example.comは証明書取得時のサイト名。
|
64
58
|
|
65
59
|
```
|
66
60
|
|
@@ -90,7 +84,7 @@
|
|
90
84
|
|
91
85
|
一番怪しいのは、2のSSL設定ファイルかなと思っておりますが、何か不足している手順などあればご指摘いただけないでしょうか。
|
92
86
|
|
93
|
-
実際の設定ファイル(default_ssl.conf)は以下のようになっております。(
|
87
|
+
実際の設定ファイル(/etc/apache2/sites-available/default_ssl.conf)は以下のようになっております。(有効部分のみ抜粋)
|
94
88
|
|
95
89
|
|
96
90
|
|
@@ -102,9 +96,17 @@
|
|
102
96
|
|
103
97
|
ServerAdmin info@example.com
|
104
98
|
|
105
|
-
ServerName example.com:443
|
99
|
+
ServerName www.example.com:443
|
100
|
+
|
101
|
+
|
106
102
|
|
107
103
|
DocumentRoot /var/www/html
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
ErrorLog ${APACHE_LOG_DIR}/error.log
|
108
|
+
|
109
|
+
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
108
110
|
|
109
111
|
|
110
112
|
|
@@ -112,10 +114,40 @@
|
|
112
114
|
|
113
115
|
|
114
116
|
|
115
|
-
|
117
|
+
SSLCertificateFile /etc/letsencrypt/live/www.jsspractice.club/cert.pem
|
116
118
|
|
117
|
-
|
119
|
+
SSLCertificateKeyFile /etc/letsencrypt/live/www.jsspractice.club/privkey.pem
|
118
120
|
|
119
|
-
|
121
|
+
SSLCertificateChainFile /etc/letsencrypt/live/www.jsspractice.club/chain.pem
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<FilesMatch "\.(cgi|shtml|phtml|php)$">
|
126
|
+
|
127
|
+
SSLOptions +StdEnvVars
|
128
|
+
|
129
|
+
</FilesMatch>
|
130
|
+
|
131
|
+
<Directory /usr/lib/cgi-bin>
|
132
|
+
|
133
|
+
SSLOptions +StdEnvVars
|
134
|
+
|
135
|
+
</Directory>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
BrowserMatch "MSIE [2-6]" \
|
140
|
+
|
141
|
+
nokeepalive ssl-unclean-shutdown \
|
142
|
+
|
143
|
+
downgrade-1.0 force-response-1.0
|
144
|
+
|
145
|
+
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
</VirtualHost>
|
150
|
+
|
151
|
+
</IfModule>
|
120
152
|
|
121
153
|
```
|
1
セクションの区切りを見やすく修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
```bash
|
2
|
+
|
3
|
+
sudo a2enmod ssl
|
4
|
+
|
5
|
+
```
|
6
|
+
|
1
7
|
お世話になります。
|
2
8
|
|
3
9
|
|
@@ -6,11 +12,11 @@
|
|
6
12
|
|
7
13
|
|
8
14
|
|
9
|
-
【環境】
|
15
|
+
###【環境】
|
10
16
|
|
11
17
|
GCPのCloudランチャーで、bitnamiのwordpressパッケージをデプロイしました。
|
12
18
|
|
13
|
-
OS:Debian8
|
19
|
+
OS:Debian8.6
|
14
20
|
|
15
21
|
Webサーバ:apache 2.4.23
|
16
22
|
|
@@ -18,7 +24,7 @@
|
|
18
24
|
|
19
25
|
|
20
26
|
|
21
|
-
【現状】
|
27
|
+
###【現状】
|
22
28
|
|
23
29
|
Let's Encriptによる証明書の取得までは上手くいきましたが、
|
24
30
|
|
@@ -28,13 +34,17 @@
|
|
28
34
|
|
29
35
|
|
30
36
|
|
31
|
-
【行ったこと】
|
37
|
+
###【行ったこと】
|
32
38
|
|
33
39
|
|
34
40
|
|
35
41
|
1.SSLモジュールの有効化
|
36
42
|
|
43
|
+
```bash
|
44
|
+
|
37
45
|
sudo a2enmod ssl
|
46
|
+
|
47
|
+
```
|
38
48
|
|
39
49
|
|
40
50
|
|
@@ -42,7 +52,7 @@
|
|
42
52
|
|
43
53
|
/etc/apache2/sites-available/default-ssl.confに以下の設定を追加(編集)。
|
44
54
|
|
45
|
-
|
55
|
+
```
|
46
56
|
|
47
57
|
SSLCertificateFile /etc/letsencrypt/live/**example.com**/cert.pem
|
48
58
|
|
@@ -52,17 +62,25 @@
|
|
52
62
|
|
53
63
|
※**exsample.com**は証明書取得時のサイト名。
|
54
64
|
|
65
|
+
```
|
66
|
+
|
55
67
|
|
56
68
|
|
57
69
|
3.SSL設定ファイルの有効化
|
58
70
|
|
71
|
+
```bash
|
72
|
+
|
59
73
|
sudo a2ensite default-ssl
|
60
74
|
|
61
|
-
|
75
|
+
```
|
62
76
|
|
63
77
|
4.apacheの再起動。
|
64
78
|
|
79
|
+
```bash
|
80
|
+
|
65
81
|
sudo apachectl restart
|
82
|
+
|
83
|
+
```
|
66
84
|
|
67
85
|
|
68
86
|
|
@@ -72,9 +90,11 @@
|
|
72
90
|
|
73
91
|
一番怪しいのは、2のSSL設定ファイルかなと思っておりますが、何か不足している手順などあればご指摘いただけないでしょうか。
|
74
92
|
|
75
|
-
実際の設定ファイルは以下のようになっております。(一部抜粋)
|
93
|
+
実際の設定ファイル(default_ssl.conf)は以下のようになっております。(一部抜粋)
|
76
94
|
|
77
95
|
|
96
|
+
|
97
|
+
```
|
78
98
|
|
79
99
|
<IfModule mod_ssl.c>
|
80
100
|
|
@@ -97,3 +117,5 @@
|
|
97
117
|
SSLCertificateKeyFile /etc/letsencrypt/live/**example.com**/privkey.pem
|
98
118
|
|
99
119
|
SSLCertificateChainFile /etc/letsencrypt/live/**example.com**/chain.pem
|
120
|
+
|
121
|
+
```
|