GNU/Linux >> Linux の 問題 >  >> Cent OS

Let's Encrypt:クライアントに十分な承認がありません ::無効な応答

最近、自分のサイト cPanelTips.com で Let’s Encrypt SSL 証明書を使い始めました。正直に言うと、Let's Encrypt は SSL 証明書のインストール方法を変更しました。

会社と個人の詳細を入力し、CSR コードを生成し、SSL レジストラに送信して、最終的に CRT コードウェアを待つ必要があった昔は、今ではなくなりました。

Let’s Encrypt は、cPanel とプレーン Linux サーバーの両方に SSL 証明書をインストールするための簡単かつ迅速な方法です。私の場合、この SSL 証明書は CentOS 7.x 64 ビットにインストールされており、SSL 更新の期限が来るまで完全に機能します。

しかし、Let’s Encrypt の ssl 証明書の更新時期が迫ったとき、certbot コマンドを使用して更新オプションを実行しているときに、奇妙なことに気付きました。以下を参照してください。

[[email protected]:~]/usr/bin/certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert is due for renewal, auto-renewing...
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for nixcp.com
Waiting for verification...
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/nixcp.com.conf produced an unexpected error: Failed authorization procedure. nixcp.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://nixcp.com/.well-known/acme-challenge/qtxjYi0a3FYNWpvqW-WTyZZzj848Yr0J6Sfx-75xDrg

エラーは明らかでした:

クライアントに十分な権限がありません ::http://nixcp.com/.well-known/acme-challenge/ からの無効な応答

同じ更新プロセスで、私が管理している別の Web サイトでも別のエラーが発生しました:

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/mysecondsite.com/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: mysecondsite.com
   Type:   unauthorized
   Detail: Invalid response from
   http://mysecondsite.com/.well-known/acme-challenge/YjP9PAcIEANeX50kZJ9vJ-lARkryYs7yFSLhKBU9Y_M:
   404 Not Found

   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. The A records were configured ok at the DNS server, and the first thing that came to my mind was that certbot was trying to connect to http://, instead of https://.

http から https への 301 リダイレクトを使用するようにこれら 2 つのドメインを構成しました。この実行中の curl を http に対してテストして、301 リダイレクトに問題があるかどうかを確認しましたが、私が見る限り、それは問題ではありませんでした。

curl -I http://nixcp.com/.well-known/acme-challenge/

301 リダイレクト OK 状態を返したのに、certbot が最終 URL に到達できないのはなぜですか?

わかりませんが、うまくいったものがあります。 http から https への 301 リダイレクトの例外を作成し、両方のドメインで問題なく certbot 更新プロセスを実行できるようにしました。

これは、Let’s Encrypt で使用される .well-known ディレクトリを除いて、301 をすべて http から https にリダイレクトするために使用したコードです。

server {
   listen 80;
   server_name www.nixcp.com nixcp.com;
   
    # Redirect all requests to https
    location / {
        return 301 https://nixcp.com$request_uri;
    }

    # This rule excludes the .well-known directory from the 301 redirect.
    location /.well-known {
        root /var/www/nixcp.com;
    }
}

http を使用して .well-known ディレクトリにアクセスできるようにしておくことが、certbot の更新プロセスを問題なく実行するための鍵でした。その後、certbot が使用する検証ディレクトリが実際に作成されていることを確認しました:

mkdir -p /var/www/caneltips.com/.well-known/acme-challenge

その後、再度更新コマンドを実行したところ、結果は次のようになりました:

さらに3ヶ月間更新OKでした! 🙂

暗号化しましょう:クライアントに十分な権限がありません ::無効な応答が最後に変更されました:2017 年 4 月 5 日、エステバン ボルヘス
Cent OS
  1. Let'sEncryptによるCentos上のNginxの無料SSL

  2. CentOS7でLet'sEncryptを使用してApacheを保護する-ステップバイステップのプロセス?

  3. ホームパーティションを暗号化する方法は?

  1. CentOS7にApacheでLet'sEncryptをインストールする方法

  2. CentOS / RHEL 6,7 :イニシエーター (iSCSI クライアント) で iSCSI ターゲットを削除する方法

  3. Tang サーバーキーをローテーションして Clevis クライアントを更新する方法

  1. Linuxコミュニティでの信頼の構築

  2. Linuxで完全に放送する最初の

  3. Ubuntu20.04にCertbotを使用してLet'sEncrypt証明書をインストールする-NginxWebサーバーでそれを行う方法は?