facebook twitter hatena line email

「Aws/lightsail」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(https化対応)
(https化対応)
行18: 行18:
 
  E-mail address []: ******@gmail.com
 
  E-mail address []: ******@gmail.com
 
  Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: y
 
  Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: y
 +
https化できた。
  
 
==apache再起動==
 
==apache再起動==

2022年12月22日 (木) 19:46時点における版

ログイン方法

  1. https://lightsail.aws.amazon.com/ls/webapp/home
  2. Download default key"をクリックして、鍵をDLする。
  3. LightsailDefaultKey-ap-northeast-1.pemファイルがDLされる。
  4. 以下のようなshellを作る
ssh -i LightsailDefaultKey-ap-northeast-1.pem bitnami@54.250.xx.xx

https化対応

公式:https://lightsail.aws.amazon.com/ls/docs/ja_jp/articles/amazon-lightsail-enabling-https-on-wordpress

お名前などから、ドメインを割り当てた後、以下実行。

$ sudo /opt/bitnami/bncert-tool
Domain list []: aws.nonip.net
The following domains were not included: www.aws.nonip.net. Do you want to add them? [Y/n]: n
Enable HTTP to HTTPS redirection [Y/n]: y
Do you agree to these changes? [Y/n]: y
E-mail address []: ******@gmail.com
Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]: y

https化できた。

apache再起動

bitnamiを使っておりそれに従う。

sudo /opt/bitnami/ctlscript.sh restart apache

固定IP化

固定IP化対応をしないと、インスタンスを停止するたびに、ipが変わる。

Networkingタブのipの記載の下に、AttachStaticIPのリンクが、あるので、クリックしStaticIPを作成する