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 5 years have passed since last update.

Let'Encrypt&Certbotを導入する

0
Last updated at Posted at 2017-08-15

はじめに

少しつまずいたので個人的にメモします。

前提条件

  • OSはCentOS6系
  • WEBサーバはapache、起動しておくこと
  • gitインストール済
  • DNSによるAレコード設定が完了していること

手順

  • ホームディレクトリへ移動
command
$ cd ~
  • gitからcertbotをダウンロード
command
$ git clone https://github.com/certbot/certbot`
  • ダウンロードしたフォルダ内でテスト実行
command
$ cd certbot
$ sudo ./certbot-auto –debug
  • 証明書発行
command
$ sudo ./certbot-auto certonly --webroot -w /path/to/Documentroot -d example.com -m example@example.com --renew-by-default --agree-tos --debug

-wはドキュメントルート。
-dはFQDN。
-mは通知用メールアドレス。
--renew-by-defaultはSSL/TLS サーバ証明書が既に存在する場合には、残りの有効期間にかかわらず、証明書を更新。
--debugはエラー時のtracebackを表示。
注)Basic認証を掛けている場合ドキュメントルート配下の.well-know配下に.htaccessを追加する

.htaccess
Satisfy any
order allow,deny  
allow from all  
  • apache再起動
command
$ sudo service httpd restart
  • 自動更新のためcron設定
    毎月1日1時に更新
crontab
0 1 1 * * root /home/user/certbot/certbot-auto renew –force-renew && service httpd reload

参考

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?