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

CentOS6でLet's Encryptのワイルドカード証明書を取得

Posted at

前提

Certbotのインストール

# yum install epel-release
# wget https://dl.eff.org/certbot-auto
# mv certbot-auto /usr/local/bin/certbot-auto
# chmod 0755 /usr/local/bin/certbot-auto

Apahceの設定を変えずに証明書の取得だけ実行するコマンドを実行する
初回は SCL repository やら python やらが必要なので指示通りインストールする

# /usr/local/bin/certbot-auto certonly --apache
Complete!
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel):

一度キャンセルする

ワイルドカード証明書の取得

-d はSANs のDNS Name
-m は連絡先メールアドレス

# /usr/local/bin/certbot-auto certonly --manual
 --server https://acme-v02.api.letsencrypt.org/directory
 --preferred-challenges dns
 --agree-tos
 --manual-public-ip-logging-ok
 -d *.example.com -d example.com
 -m hoge@example.com

チャレンジが表示されるので自身のDNSにTXTレコードを登録する

  • エントリ: _acme-challenge.example.com
  • タイプ: TXT
  • 値: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please deploy a DNS TXT record under the name
_acme-challenge.example.com with the following value:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Before continuing, verify the record is deployed.
Press Enter to Continue

登録した後、DNSレコードが反映されるまで(10分程度)待ってからEnterを実行する
成功すると以下が表示される

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/example.com/privkey.pem

Let's Encrypt に寄付する

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?