質問編集履歴
2
追記事項を編集しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -25,6 +25,8 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
(補足)
|
28
|
+
|
29
|
+
#インストール
|
28
30
|
|
29
31
|
yum -y install epel-release
|
30
32
|
|
@@ -78,13 +80,13 @@
|
|
78
80
|
|
79
81
|
</ifModule>
|
80
82
|
|
81
|
-
再起動
|
83
|
+
#再起動
|
82
84
|
|
83
85
|
systemctl start httpd
|
84
86
|
|
85
87
|
|
86
88
|
|
87
|
-
定時自動更新
|
89
|
+
#定時自動更新
|
88
90
|
|
89
91
|
crontab -u root -e
|
90
92
|
|
1
設定事項を追記します
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,3 +21,71 @@
|
|
21
21
|
ほかに設定が必要なのでしょうか?
|
22
22
|
|
23
23
|
よろしくお願いいたします。
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
(補足)
|
28
|
+
|
29
|
+
yum -y install epel-release
|
30
|
+
|
31
|
+
yum -y install certbot python-certbot-apache
|
32
|
+
|
33
|
+
curl https://dl.eff.org/certbot-auto -o /usr/bin/certbot-auto
|
34
|
+
|
35
|
+
chmod 700 /usr/bin/certbot-auto
|
36
|
+
|
37
|
+
certbot-auto certonly --webroot -w /var/www/laravel/public -d hogehoge.jp --email hoge@hogehoge.jp
|
38
|
+
|
39
|
+
ls -l /etc/letsencrypt/live/hogehoge.jp/
|
40
|
+
|
41
|
+
#証明書設定
|
42
|
+
|
43
|
+
vi /etc/httpd/conf.d/ssl.conf
|
44
|
+
|
45
|
+
SSLCertificateFile /etc/letsencrypt/live/hogehoge.jp/cert.pem
|
46
|
+
|
47
|
+
SSLCertificateKeyFile /etc/letsencrypt/live/hogehoge.jp/privkey.pem
|
48
|
+
|
49
|
+
SSLCertificateChainFile /etc/letsencrypt/live/hogehoge.jp/chain.pem
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
systemctl stop httpd
|
54
|
+
|
55
|
+
systemctl start httpd
|
56
|
+
|
57
|
+
systemctl stop httpd
|
58
|
+
|
59
|
+
firewall-cmd --add-service=https --zone=public --permanent
|
60
|
+
|
61
|
+
firewall-cmd --reload
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
vi /etc/httpd/conf/httpd.conf
|
66
|
+
|
67
|
+
#追加
|
68
|
+
|
69
|
+
<ifModule mod_rewrite.c>
|
70
|
+
|
71
|
+
RewriteEngine On
|
72
|
+
|
73
|
+
LogLevel alert rewrite:trace3
|
74
|
+
|
75
|
+
RewriteCond %{HTTPS} off
|
76
|
+
|
77
|
+
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
|
78
|
+
|
79
|
+
</ifModule>
|
80
|
+
|
81
|
+
再起動
|
82
|
+
|
83
|
+
systemctl start httpd
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
定時自動更新
|
88
|
+
|
89
|
+
crontab -u root -e
|
90
|
+
|
91
|
+
00 04 01 * * certbot renew && systemctl restart httpd
|