facebook twitter hatena line email

Aws/lightsail

提供: 初心者エンジニアの簡易メモ
2023年1月17日 (火) 13:42時点におけるAdmin (トーク | 投稿記録)による版 (apache再起動)

移動: 案内検索

ログイン方法

  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設定

vi /opt/bitnami/apache2/conf/httpd.conf

apache再起動

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

sudo /opt/bitnami/ctlscript.sh restart apache

固定IP化

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

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