2017-02-12 59 views
0

この質問は何度か尋ねられましたが、私はいくつかの具体的な助けが必要です。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-knownacme-challengeフォルダを追加し、テストのためにtest.txtファイルを含めました。ブラウザのディレクトリとテキストファイルにアクセスできました。

certbot-autoコマンドを実行したときにacme-challengeフォルダが作成されていないため、権限の問題であるようです。私はcertbot-autoをrootとして実行していますが、.well-knownacme-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]]下の行に変更します:

答えて

1

私はこのconfファイルを編集しなければならなかった私の場合は

[[webroot_map]] 
offensively-bad.com = /path/to/what/certbot/thinks/is/the/correct/webroot/path/initially/specified/by/the/user 

を、私は助けるためletsencryptのフォーラムに

offensively-bad.com = /var/www/offensively-bad.com/public_html/ 

おかげにそれを変更しました私を出す。

関連する問題