<p>certbot agrega acme-challenge a la configuración incorrecta, si el nombre de dominio no está en minúsculas</p>

Creado en 17 feb. 2019  ·  3Comentarios  ·  Fuente: certbot/certbot

  • Debian 9.6
  • Instalé Certbot con el administrador de paquetes del sistema operativo
  • certbot 0.28.0
  • nginx

  • tenía este host en mi configuración en /etc/nginx/conf.d/RussianChurchVancouver.ca.conf :

server {
  listen       80;
  server_name  RussianChurchVancouver.ca www.RussianChurchVancouver.ca;
...
  • Ejecuté certbot y los certificados no se crearon, porque certbot falló:
root<strong i="18">@deb96</strong>:/var/www/RussianChurchVancouver.ca/web# certbot -m [email protected] --agree-tos --nginx -d RussianChurchVancouver.ca -d www.RussianChurchVancouver.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for russianchurchvancouver.ca
http-01 challenge for www.russianchurchvancouver.ca
nginx: [warn] conflicting server name "www.russianchurchvancouver.ca" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "russianchurchvancouver.ca" on 0.0.0.0:80, ignored
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. russianchurchvancouver.ca (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://russianchurchvancouver.ca/.well-known/acme-challenge/b4vlj_zIdB4H_a94FlltJWx2JBGBDS_ihAFWrpJSl5U: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n", www.russianchurchvancouver.ca (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.russianchurchvancouver.ca/.well-known/acme-challenge/B8e0i1p0jhjNtfV1Dd36rlE8eh4K2bpefVvABc6Na48: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n"

Mientras solucionaba problemas, encontré que certbot agregando acme-challenge a este archivo de configuración:

Writing nginx conf tree to /etc/nginx/conf.d/default.conf

cuál es el error. es por eso que tengo conflicting server name en el registro (el certbot creó una situación cuando tengo russianchurchvancouver.ca tanto en default.conf como en RussianChurchVancouver.ca.conf
Se esperaba que agregara acme-challenge a este archivo:

/etc/nginx/conf.d/RussianChurchVancouver.ca.conf

En este punto, comencé a sospechar que certbot hace eso porque mis dominios en el archivo de configuración no son minúsculas.
Entonces, los puse en minúsculas:

  server_name  russianchurchvancouver.ca www.russianchurchvancouver.ca;

y certbot funcionó correctamente:

root<strong i="37">@deb96</strong>:/etc/nginx/conf.d# certbot -m [email protected] --agree-tos --nginx -d russianchurchvancouver.ca,www.russianchurchvancouver.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.russianchurchvancouver.ca
http-01 challenge for russianchurchvancouver.ca
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/conf.d/RussianChurchVancouver.ca.conf
Deploying Certificate to VirtualHost /etc/nginx/conf.d/RussianChurchVancouver.ca.conf
...
Congratulations! You have successfully enabled https://russianchurchvancouver.ca
and https://www.russianchurchvancouver.ca
nginx ui / ux bug has pr unplanned

Todos 3 comentarios

Gracias por informar, ¡esto seguro es un error! Tiene razón, la solución por ahora es asegurarse de hacer coincidir el caso con lo que está escrito en los archivos de configuración.

Hemos realizado muchos cambios en Certbot desde que se abrió este problema. Si aún tiene este problema con una versión actualizada de Certbot, ¿puede agregar un comentario para informarnos? Esto nos ayuda a ver mejor qué problemas siguen afectando a nuestros usuarios. Si no hay actividad en los próximos 30 días, este problema se cerrará automáticamente.

Esto sigue siendo un error.

¿Fue útil esta página
0 / 5 - 0 calificaciones