Re: renouvellement de certificat

Pàgina inicial

Reply to this message
Autor: Patrice Karatchentzeff
Data:  
A: Dominique Fournier
CC: GUILDE
Assumpte: Re: renouvellement de certificat
Bonjour Dominique,

Merci de ton aide.

J'ai oublié de dire que le serveur tourne depuis des années et que
j'ai déjà renouvelé plusieurs fois le certificat. La nouveauté est que
j'ai dû changer de version de Debian (peut-être deux versions
d'affilée...) pour pouvoir mettre à jour le Nextcloud qui tourne
dessus.

J'ai bien dans ma conf de nginx

location ^~ /.well-known/acme-challenge/* {
         allow all;
}


mais précédant ce réglage :
location / {
      rewrite ^ //index.php/$uri
}


Jusqu'à présent, ça fonctionnait. Effectivement,
http://site/.well-known/acme-challenge/ renvoie à mon index.php, ce
qui fait échouer le certbot.

Si je vire le rewrite, je perds le fonctionnement de mon site :(

PK
Le mar. 15 févr. 2022 à 07:57, Dominique Fournier
<dominique@???> a écrit :
>
> Bonjour Patrice
>
> Véfifie que ta machine répond à l'adresse en
> http://SITE/.well-known/acme-challenge/ (SANS https et sans faire de
> redirection vers un CMS).
>
> C'est l'endroit où certbot dépose ses fichiers de challenge, et il doit
> être accessible depuis les serveurs de Letsencrypt.
>
> Dans mon NGINX, il y a :
> location ^~ /.well-known/acme-challenge/ {
>          default_type "text/plain";
>          root /var/www/letsencrypt;
>          allow all;
> }

>
> C'est intégré dans tous mes sites afin de pointer vers ce répertoire,
> avant la gestion du reste des redirections, PHP et autres...
>
> Bonne journée
>
> Dom
>
> Le 15/02/2022 à 07:03, Patrice Karatchentzeff a écrit :
> > Salut,
> >
> > J'ai un souci un peu chaud. J'ai un certificat Let's Encrypt qui
> > expire demain. Sur un kimsufi.
> >
> > Si je tente un renouvellement :
> >
> > # certbot renew
> > Saving debug log to /var/log/letsencrypt/letsencrypt.log
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > Processing /etc/letsencrypt/renewal/XX.conf
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > Cert is due for renewal, auto-renewing...
> > Plugins selected: Authenticator webroot, Installer None
> > Renewing an existing certificate
> > Performing the following challenges:
> > http-01 challenge for XX.eu
> > Waiting for verification...
> > Cleaning up challenges
> > Attempting to renew cert (XX.eu) from
> > /etc/letsencrypt/renewal/XX.eu.conf produced an unexpected error:
> > Failed authorization procedure. XX.eu (http-01):
> > urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient
> > authorization :: Invalid response from https://XXlogin [YY]:
> > "<!DOCTYPE html>\n<html class=\"ng-csp\"
> > data-placeholder-focus=\"false\" lang=\"en\" data-locale=\"en\"
> >> \n\t<head\n data-requesttoken=\"q5M8". Skipping.
> > All renewal attempts failed. The following certs could not be renewed:
> >    /etc/letsencrypt/live/XX.eu/fullchain.pem (failure)

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

> >
> > IMPORTANT NOTES:
> > - The following errors were reported by the server:
> >
> >     Domain: XX.eu
> >     Type:   unauthorized
> >     Detail: Invalid response from
> >     https:/XX.eu/login [5.135.166.107]: "<!DOCTYPE
> >     html>\n<html class=\"ng-csp\" data-placeholder-focus=\"false\"
> >     lang=\"en\" data-locale=\"en\" >\n\t<head\n
> >     data-requesttoken=\"q5M8"

> >
> >     To fix these errors, please make sure that your domain name was
> >     entered correctly and the DNS A/AAAA record(s) for that domain
> >     contain(s) the right IP address.

> >
> > Le nom de domaine est donné par OVH (c'est le nom de la machine). La
> > machine répond parfaitement et je peux y accéder en https sur les
> > adresses où certbot se plaint.
> >
> > Une idée ?
> >
> > Merci
> >
> > PK
> >
>



--
      |\      _,,,---,,_           Patrice KARATCHENTZEFF
ZZZzz /,`.-'`'    -.  ;-;;,_   mailto:patrice.karatchentzeff@gmail.com
     |,4-  ) )-,_. ,\ (  `'-'
    '---''(_/--'  `-'\_)