前提
- EC2
- Amazon Linux
- Tomcat8
- Apache/2.2.34
- 独自ドメインを取得後、Route53によりIPアドレスと紐づけ完了
- digコマンドによりドメインとIPアドレスの対応は確認済み
実現したいこと
現在、独自ドメインを取得後Let's Encryptを用いてApacheの通信をSSL化しようと考えています。
いくつかのQiitaの記事なども参照しながら行いました。
0. cerbotのインストール
0. 証明書の発行
certbot-auto certonly --webroot -w /var/www/html -d [取得した独自ドメイン] --email [メールアドレス] -n --agree-tos --debug
・オプションの意味
-n 対話の入力をスキップ
--agree-tos 利用規約に同意する
--debug AWSではこれがないとエラーになる
上記のコマンドを実行すると下記のエラーが出てきて、証明書の発行が上手くできません。
# certbot-auto certonly --webroot -w /var/www/html -d [独自ドメイン] --email [メールアドレス] -n --agree-tos --debug Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator webroot, Installer None Obtaining a new certificate Performing the following challenges: http-01 challenge for [独自ドメイン] Using the webroot path /var/www/html for all unmatched domains. Waiting for verification... Cleaning up challenges Exiting abnormally: Traceback (most recent call last): File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module> sys.exit(main()) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1364, in main return config.func(config, plugins) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1249, in certonly lineage = _get_and_save_cert(le_client, config, domains, certname, lineage) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 121, in _get_and_save_cert lineage = le_client.obtain_and_enroll_certificate(domains, certname) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 410, in obtain_and_enroll_certificate cert, chain, key, _ = self.obtain_certificate(domains) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 353, in obtain_certificate orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 389, in _get_order_and_authorizations authzr = self.auth_handler.handle_authorizations(orderr, best_effort) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 82, in handle_authorizations self._respond(aauthzrs, resp, best_effort) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 161, in _respond self._poll_challenges(aauthzrs, chall_update, best_effort) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/auth_handler.py", line 232, in _poll_challenges raise errors.FailedChallenges(all_failed_achalls) FailedChallenges: Failed authorization procedure. [独自ドメイン] (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://[独自ドメイン]/.well-known/acme-challenge/AeGl_pZiBRDM1qoWopM5HIaBS_zRfWGUo5G90xPV-ag [IPアドレス]: 404 Please see the logfiles in /var/log/letsencrypt for more details. IMPORTANT NOTES: - The following errors were reported by the server: Domain: [独自ドメイン] Type: unauthorized Detail: Invalid response from http://[独自ドメイン]/.well-known/acme-challenge/AeGl_pZiBRDM1qoWopM5HIaBS_zRfWGUo5G90xPV-ag [IPアドレス]: 404 To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address.
なぜできないのか分からず、ネットで調べても原因が特定できなかったため質問させていただきました。
分かる方がいらっしゃれば回答のほどよろしくお願いいたします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/22 11:12
2019/01/22 11:19
2019/01/22 13:45
2019/01/22 14:03
2019/01/22 14:28 編集
2019/01/22 14:51
2019/01/22 15:22
2019/01/22 15:27
2019/01/22 15:44 編集
2019/01/22 15:51