LoginSignup
0
1

More than 1 year has passed since last update.

aws light sail に bitnamiを使わずにSSL設定

Last updated at Posted at 2022-04-20

今回は yomiplus.com のドメインを利用。

上記を参考にした方が良いかも。

bitnamiがバグって上手く動かないので。


Bitnami installation directory

Please type a directory that contains a Bitnami installation. The default 
installation directory for Linux installers is a directory inside /opt.

Bitnami installation directory []: /opt/bitnami

の連続。心折れたので以下の方法でインスコ。

・nginx

certbot をインスコ

sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y certbot

nginxを止めて証明書発行

ここはスタンドアロンではなくwebrootモードでインスコしたほうがいい。
https://qiita.com/ma7ma7pipipi/items/adc96f41cd491a3219fe

service nginx stop
certbot certonly --standalone -d yomiplus.com ?webrootのがいい

1 メアドを入力してね(期限切れとか教えてくれる)
2 メルマガ送っていい?N

これで成功。

そしてAAAAレコードにも設定してねと出るので、
awsのngworkingからAAAAレコードにもドメインを設定しておこう。

nginxの設定

vim /etc/nginx/conf.d/default.conf

server {
    listen 443 ssl http2;
    server_name yomiplus.com;
    ssl_certificate     /etc/letsencrypt/live/yomiplus.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yomiplus.com/privkey.pem;
}

nginx restart

service nginx start
0
1
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
1