LoginSignup
0
1

More than 5 years have passed since last update.

「Let's Encrypt」ー CentOS7 nginx

Posted at

実行環境

  • CentOS7
  • nginx 1.12.2

Step1

certbotのインストール、発行

「certbot」とは?
Let’s Encryptが提供しているクライアントソフトウェアです。
これを使えば楽々に証明書を取得して更新できるようになります。

//clone
$ sudo git clone https://github.com/certbot/certbot.git

//ディレクトリ移動
$ cd ~/certbot

//導入
$ sudo ./certbot-auto

いろいろ聞かれますので自分に合った環境で設定してください。
しっかりと答えていると設定を自動でやってくれちゃいます。

LastStep

自動更新の設定

Let'sEncryptを利用する上で気をつけたい点があります。
証明書の有効期限は90日で切れます。
なので、証明書を自動で更新するようにしましょう。

$sudo crontab -e

//毎月の1日に更新、再起動を行います
0 1 1 * * root /ホームディレクトリ/certbot/certbot-auto renew --force-renewal && systemctl restart nginx
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