質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
SSL

SSL(Secure Sockets Layer)とは、暗号化されたプロトコルで、インターネット上での通信セキュリティを提供しています。

Q&A

解決済

3回答

9052閲覧

Let’s Encrypt 複数ドメイン用に証明書を取得できない件です。

marshmallowy

総合スコア204

SSL

SSL(Secure Sockets Layer)とは、暗号化されたプロトコルで、インターネット上での通信セキュリティを提供しています。

0グッド

1クリップ

投稿2017/02/10 08:55

###前提
Let’s Encrypt で最初に証明書を取得したドメイン以外、証明書を取得することができませんでした。

Let's Encrypt 総合ポータル : https://letsencrypt.jp/usage/dvsni-challenge-error.html

上記、サイトで確認したところ、原因は複数ありましたが、どれも当てはまりませんでした。

なにか、制限などかかっているのでしょうか?
また、時間が解決するものなのでしょうか?

ご教授の程、よろしくお願い申し上げます。

###発生している問題・エラーメッセージ

Saving debug log to /var/log/letsencrypt/letsencrypt.log Obtaining a new certificate Performing the following challenges: http-01 challenge for domain-name http-01 challenge for www.domain-name Using the webroot path /var/www/html/chiic for all unmatched domains. Waiting for verification... Cleaning up challenges Failed authorization procedure. www.domain-name (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to www.domain-name, domain-name (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to domain-name IMPORTANT NOTES: - The following errors were reported by the server: Domain: www.domain-name Type: connection Detail: Could not connect to www.domain-name Domain: domain-name Type: connection Detail: Could not connect to domain-name To fix these errors, please make sure that your domain name was entered correctly and the DNS A record(s) for that domain contain(s) the right IP address. Additionally, please check that your computer has a publicly routable IP address and that no firewalls are preventing the server from communicating with the client. If you're using the webroot plugin, you should also verify that you are serving files from the webroot path you provided.

###該当のソースコード

/usr/build/ssl/certbot/certbot-auto certonly --webroot -w /var/www/html/domain-name -d domain-name -d www.domain-name --email user@domain-name

###補足情報
IPアドレスは、1つです。
ドメインは、サブドメインではなく、異なるドメインです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ikedas

2017/02/10 09:00

最初に取得できたドメインは、ご質問の「domain-name」と「www.domain-name」のどちらでしょうか。
marshmallowy

2017/02/10 09:08

失礼いたしました。最初に証明書を取得したドメインは、"domain-name" と "www.domain-name"という意味です。
marshmallowy

2017/02/10 09:09

問題は次に取得したいドメイン "domain2-name" と "www.domain2-name" でエラーが返されることです。
marshmallowy

2017/02/10 09:38

お騒がせいたしました。問題を解決することができました。こちらに、い
marshmallowy

2017/02/10 09:39

こちらに、一連の流れを書き残しときます。
guest

回答3

0

自己解決

下記は、Let's Encrypt - SAN「Subject Alternative Name」で、異なるドメインの証明書を取得する方法です。

私は、最初に1つの証明書を取得できてましたので、今回は、2つ目だけを取得しました。

異なるドメインを複数取得する際には、カンマ(,)または、スペース( )でドメインを分割することで対応可能みたいです。

[root ~]# /usr/build/ssl/certbot/certbot-auto certonly
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?

1: Apache Web Server plugin - Beta (apache)
2: Place files in webroot directory (webroot)
3: Spin up a temporary webserver (standalone)

Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 2 # webrootでの認証方法を選択しました。
Please enter in your domain name(s) (comma and/or space separated) (Enter 'c' to cancel):domain-name.co.jp, www.domain-name.co.jp
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for domain-name.co.jp
http-01 challenge for www.domain-name.co.jp

Select the webroot for domain-name.co.jp:

1: Enter a new webroot

Press 1 [enter] to confirm the selection (press 'c' to cancel): 1
Input the webroot for domain-name.co.jp: (Enter 'c' to cancel):/var/www/html/domain-name# ドキュメント・ルートを指定しました。

Select the webroot for www.domain-name.co.jp:

1: Enter a new webroot
2: /var/www/html/domain-name

Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2 # 上記で指定したドキュメント・ルートを選択しました。
Waiting for verification...
Cleaning up challenges
Generating key (2048 bits): /etc/letsencrypt/keys/0001_key-certbot.pem
Creating CSR: /etc/letsencrypt/csr/0001_csr-certbot.pem

IMPORTANT NOTES:

  • Congratulations! Your certificate and chain have been saved at
    /etc/letsencrypt/live/domain-name.co.jp/fullchain.pem. Your cert will
    expire on 2017-05-11. To obtain a new or tweaked version of this
    certificate in the future, simply run certbot-auto again. To
    non-interactively renew all of your certificates, run
    "certbot-auto renew"

  • If you like Certbot, please consider supporting our work by:

    Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
    Donating to EFF: https://eff.org/donate-le

投稿2017/02/10 09:55

marshmallowy

総合スコア204

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

Could not connect toとでていますが、こちら80番ポートで接続できるようにしていますか?
接続できない場合、同様のエラーとなります。

Domain: www.domain-name Type: connection Detail: Could not connect to www.domain-name Domain: domain-name Type: connection Detail: Could not connect to domain-name

投稿2017/02/10 09:19

moonphase

総合スコア6621

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

marshmallowy

2017/02/10 09:22

はい。 curl -v telnet://domain2-name:80 で確認したところ、接続できているようです。
marshmallowy

2017/02/10 09:39

お騒がせいたしました。 問題を解決することができました。 こちらに、一連の流れを書き残しときます。
moonphase

2017/02/10 09:46

Let's Encrypt側から接続にくるのですが、 1.FQDNはグローバルIPアドレスとして正引き可能でしょうか? 2.対象の80番ポートに外部から接続可能でしょうか?
marshmallowy

2017/02/10 09:47

はい。 問題ございませんでした。
moonphase

2017/02/10 09:49

解決したのですね。 参考までに、私の利用環境ではSANを使わずに同IPで別のFQDNで利用しています。
marshmallowy

2017/02/10 09:53

そういう、やり方も存在するのですね。 今週末に試してみます。 ありがとうございました。
guest

0

Let's Encrypt 総合ポータル よくある質問に、以下のように書かれています。

1枚で複数のドメイン名に対応する証明書は発行できますか?

はい。
サブジェクトの代替名(SAN : Subject Alternative Name)という仕組みを使用することで、複数の異なるドメイン名で、同じ SSL/TLS サーバ証明書を使用することが可能です。
Let's Encrypt クライアントソフトウェアの実行オプションで複数のドメイン名を指定することで、複数ドメインに対応した証明書を発行することができます。
Webブラウザは、Webサイトのドメイン名がサブジェクトの代替名(SAN : Subject Alternative Name)のリストに掲載されていれば、正当な証明書として受け付けます。

==
同一IPに複数のドメインを割り当てる場合には、複数の証明書ではなく1枚の証明書とSANで対応するというのがLet's Encryptの方針だと思われます。

投稿2017/02/10 09:10

coco_bauer

総合スコア6915

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

marshmallowy

2017/02/10 09:40

お騒がせいたしました。 問題を解決することができました。 こちらに、一連の流れを書き残しときます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問