この質問は何度か尋ねられましたが、私はいくつかの具体的な助けが必要です。certbot-auto:クライアントに十分な権限がありません
certbot-auto renew
を使用してUbuntu 14.04でSSL証明書を更新しようとしていますが、Apache2サーバーとnginxを実行しています。私はcertbot-auto renew
のために、次の出力を取得しています:
[email protected]:/# sudo certbot-auto renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/my-domain.com.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for my-domain.com
Waiting for verification...
Cleaning up challenges
Attempting to renew cert from /etc/letsencrypt/renewal/my-domain.com.conf produced an unexpected error: Failed authorization procedure. my-domain.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://my-domain.com/.well-known/acme-challenge/ailNmgZADpb4QBipKM57sOi9w3PwNkwBwVFiRYs7i40: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p". Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/my-domain.com/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: my-domain.com
Type: unauthorized
Detail: Invalid response from
http://my-domain.com/.well-known/acme-challenge/ailNmgZADpb4QBipKM57sOi9w3PwNkwBwVFiRYs7i40:
"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p"
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.
私は.well-known
フォルダが/var/www/my-domain.com/public_html
に存在し、私は私のブラウザでhttp://my-domain.com/.well-known/
に移動したときに、私は、そのディレクトリの内容を見ることができています確保しました。 .well-known
にacme-challenge
フォルダを追加し、テストのためにtest.txt
ファイルを含めました。ブラウザのディレクトリとテキストファイルにアクセスできました。
certbot-auto
コマンドを実行したときにacme-challenge
フォルダが作成されていないため、権限の問題であるようです。私はcertbot-auto
をrootとして実行していますが、.well-known
とacme-challenge
のフォルダ(rootとwww-dataユーザーはapache2とnginxプロセスを実行しています)のwww-data
ユーザーに書き込み権限を与えました。
上記の書き込み許可を与えても、上記の404エラーが表示されます。
crontab
で実行される自動証明書更新プロセスもあり、出力はローカルファイルに記録されています。このログファイルでは、certbot-auto
が0.9.3から0.10.1にアップグレードされるまで、更新要求が正しく機能しているようです。
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/offensively-bad.com.conf
-------------------------------------------------------------------------------
The following certs are not due for renewal yet:
/etc/letsencrypt/live/offensively-bad.com/fullchain.pem (skipped)
No renewals were attempted.
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/offensively-bad.com.conf
-------------------------------------------------------------------------------
The following certs are not due for renewal yet:
/etc/letsencrypt/live/offensively-bad.com/fullchain.pem (skipped)
No renewals were attempted.
Upgrading certbot-auto 0.9.3 to 0.10.1...
Replacing certbot-auto...
Creating virtual environment...
Installing Python packages...
Installation succeeded.
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/offensively-bad.com.conf
-------------------------------------------------------------------------------
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/offensively-bad.com/fullchain.pem (failure)
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: offensively-bad.com
Type: unauthorized
Detail: Invalid response from
http://offensively-bad.com/.well-known/acme-challenge/tkSc8l-r1XVPIF5TosTbEXiYMa8sQnoXEjAEgAwRoqI:
"<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p"
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.
アップグレード後、プロセスが404メッセージで失敗し始めたことがわかります。
私はオンラインで見つけ出すことができたすべてのアドバイスを試しましたが、完全に困惑しているので、どんな助けでも大歓迎です。前もって感謝します! /etc/letsencrypt/renewal/offensively-bad.com.conf
と[[webroot_map]]
下の行に変更します: