LightsailでSSL化

AWS

$ cd /tmp
$ git clone https://github.com/letsencrypt/letsencrypt
$ cd letsencrypt
$ ./letsencrypt-auto
$ ./letsencrypt-auto certonly –webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d ドメイン名

$ sudo cp /etc/letsencrypt/live/ドメイン名/fullchain.pem /opt/bitnami/apache2/conf/server.crt
$ sudo cp /etc/letsencrypt/live/ドメイン名/privkey.pem /opt/bitnami/apache2/conf/server.key
$ sudo /opt/bitnami/ctlscript.sh restart apache

3ヶ月に1度更新が必要かも

/tmpに保存してると再起動で消えるかも

これも必要かも
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f

バナー消し
$ sudo /opt/bitnami/apps/wordpress/bnconfig –disable_banner 1
$ sudo /opt/bitnami/ctlscript.sh restart apache

cd /usr/local/bin
sudo git clone https://github.com/letsencrypt/letsencrypt
cd /usr/local/bin/lets encrypt
sudo chown root ./certbot-auto
sudo chmod 0755 ./certbot-auto
sudo chown root ./letsencrypt-auto
sudo chmod 0755 ./letsencrypt-auto
sudo ./letsencrypt-auto
sudo ./letsencrypt-auto certonly –webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d XXXXXX.XXXX
sudo cp /etc/letsencrypt/live/XXXXXX.XXX/fullchain.pem /opt/bitnami/apache2/conf/server.crt
sudo cp /etc/letsencrypt/live/XXXXXX.XXX/privkey.pem /opt/bitnami/apache2/conf/server.key
sudo /opt/bitnami/ctlscript.sh restart apache

1 1 1 * * sudo /usr/local/bin/letsencrypt/letsencrypt-auto renew
2 1 1 * * sudo cp /etc/letsencrypt/live/hoge.com/fullchain.pem /opt/bitnami/apache2/conf/server.crt
3 1 1 * * sudo cp /etc/letsencrypt/hoge.com/fullchain.pem /opt/bitnami/apache2/conf/server.crt
4 1 1 * * /opt/bitnami/ctlscript.sh restart apache

LightsailでWordPress(SSL化もする) - Qiita
Lightsailって何? LightsailっていうのはAWSにあるサービスの一つでアプリケーションつきで起動するVPSみたいなもんです。(もちろんアプリケーションなしもあるよ)
Certbot-auto deployment best practices
The following steps should be taken only if you installed Certbot by using the certbot-auto script. We were recently contacted by an individual concerned about...
https://awesome03.com/2019/06/23/lets-encrypt%E3%81%A7ssl%E8%AA%8D%E8%A8%BC%E3%81%8C%E3%80%8Cinsecure-permissions%E3%80%8D%E3%81%A8%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%86%E3%81%BE%E3%81%8F%E3%81%84%E3%81%8B%E3%81%AA%E3%81%84/

コメント

タイトルとURLをコピーしました