2017-02-12 1 views
0

Je sais que cette question a été posée plusieurs fois, mais j'ai besoin d'aide spécifique car j'ai pris conseil de plusieurs autres threads et rien n'a fonctionné jusqu'à maintenant.certbot-auto: Le client n'a pas l'autorisation suffisante

J'essaye de renouveler mon certificat SSL dans Ubuntu 14.04 en utilisant certbot-auto renew, et je cours un serveur Apache2 et nginx. Je reçois la sortie suivante pour 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. 

le dossier que j'assuré .well-known existe dans /var/www/my-domain.com/public_html et lorsque je navigue à http://my-domain.com/.well-known/ dans mon navigateur, je suis en mesure de voir le contenu de ce répertoire. J'ai également ajouté un dossier acme-challenge dans .well-known et inclus un fichier test.txt pour le test; J'ai pu accéder au répertoire et au fichier texte dans mon navigateur.

J'ai trouvé que le dossier acme-challenge n'a pas été créé lorsque j'ai exécuté la commande certbot-auto alors cela semble être un problème d'autorisations. Je cours certbot-auto en tant que racine, mais a également donné des autorisations en écriture à www-data utilisateur sur les dossiers .well-known et acme-challenge (les utilisateurs root et www-data exécutent les processus apache2 et nginx).

Même après avoir accordé cette autorisation d'écriture, j'obtiens toujours l'erreur 404 détaillée ci-dessus.

J'ai également un processus automatisé de renouvellement de certificat fonctionnant par crontab et j'ai la production étant enregistrée dans un dossier local. Dans ce fichier journal, je vois que la demande de renouvellement semblait fonctionner correctement jusqu'à ce que certbot-auto soit mis à jour de 0.9.3 à 0.10.1. Voici un exemple du fichier journal lorsque la mise à niveau a eu lieu:

------------------------------------------------------------------------------- 
    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. 

Vous pouvez voir que, après la mise à niveau, le processus a commencé à défaut avec un message 404.

J'ai essayé tous les conseils que j'ai pu trouver en ligne et je suis complètement perplexe, donc toute aide serait grandement appréciée. Merci d'avance!

Répondre

1

je dû modifier ce fichier de configuration: /etc/letsencrypt/renewal/offensively-bad.com.conf et modifier la ligne ci-dessous [[webroot_map]]:

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

Dans mon cas, je l'ai changé à

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

Merci au forum à letsencrypt pour aider moi dehors.