0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Lightsail で nginx + Let's Encrypt 設定のメモ

Posted at

背景

Lightsail だと nginx があって, ぱぱっと時短で https サーバー建てられそうなので Lightsail でサーバ選んでみた.

Let's Encrypt を apt あたりで入れて certbot だとそのままでは証明書インストールと更新できん... :angry:

原因

Lightsail で nginx など Linux 系選ぶと, Ubuntu ベースの bitonami(AWS が買収した?)なディストリビューションとなり, nginx のサービス設定や起動あたりは systemctl ではなく(バックエンドは systemd つかっているかもであるが) /opt/binami/***/opt/bitnami/ctlscript.sh で行うようになっています.

一応 certbot 自体は bitnami の設定を扱えるようですが, nginx(web server)の start と stop はできないため, certbot で証明書インストールや更新しようとしても web サーバーが建てられない(or 他に起動している)となってしまいます.

方法

ありがとうございます.

一旦 /opt/bitnami/ctlscript.sh stop でサービス停めないといけませんでした.

サーバー建てる前に, apt とかではなくて bitnami で certbot のツール入れて webroot で設定しておいて無停止にできるようにしておくとよさそうです!

証明書自動更新する

ありがとうございます.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?