Da ich bemerkt habe, dass sich eines meiner Zertifikate nicht selbst aktualisiert, bin ich vor kurzem beim manuellen aktualisieren meines Zertifikats auf folgendes Problem gestoßen.
Attempting to renew cert (monitoring.oprtr.org) from /etc/letsencrypt/renewal/monitoring.oprtr.org.conf produced an unexpected error: Missing command line flag or config entry for this setting: Input the webroot for monitoring.oprtr.org:. Skipping. The following certs could not be renewed: /etc/letsencrypt/live/monitoring.oprtr.org/fullchain.pem (failure)
Im Prinzip sagt die Meldung aus, dass das Webroot Verzeichnis für den Dienst hinter der Domain nicht richtig angegeben wurde. Im Normalfall ist dieses z.B. unter /var/www/html.
Etwas wunderte mich dies, da die Konfiguration, welche in der Fehlermeldung angezeigt wurde, automatisiert von Certbot erstellt wurde.
Sie sah in meinem Fall wie folgt aus:
# renew_before_expiry = 30 days version = 0.31.0 archive_dir = /etc/letsencrypt/archive/monitoring.oprtr.org cert = /etc/letsencrypt/live/monitoring.oprtr.org/cert.pem privkey = /etc/letsencrypt/live/monitoring.oprtr.org/privkey.pem chain = /etc/letsencrypt/live/monitoring.oprtr.org/chain.pem fullchain = /etc/letsencrypt/live/monitoring.oprtr.org/fullchain.pem # Options used in the renewal process [renewalparams] account = ### server = https://acme-v02.api.letsencrypt.org/directory authenticator = webroot rsa_key_size = blub webroot_path = /var/www/certbot [[webroot_map]]
Auf den ersten Blick scheint es so, als sei „webroot_path“ richtig angegeben. Anschließend schaute ich mir die Konfiguration einer anderen Domain an. Hierbei fiel mir auf, dass das Webroot Verzeichnis etwas anders definiert wurde.
Ich entfernte die Zeilen:
webroot_path = /var/www/certbot [[webroot_map]]
Und ersetzte diese mit:
[[webroot_map]] monitoring.oprtr.org = /var/www/certbot
Anschließend sah meine Konfiguration wie folgt aus:
# renew_before_expiry = 30 days version = 0.31.0 archive_dir = /etc/letsencrypt/archive/monitoring.oprtr.org cert = /etc/letsencrypt/live/monitoring.oprtr.org/cert.pem privkey = /etc/letsencrypt/live/monitoring.oprtr.org/privkey.pem chain = /etc/letsencrypt/live/monitoring.oprtr.org/chain.pem fullchain = /etc/letsencrypt/live/monitoring.oprtr.org/fullchain.pem # Options used in the renewal process [renewalparams] account = #### server = https://acme-v02.api.letsencrypt.org/directory authenticator = webroot rsa_key_size = blub [[webroot_map]] monitoring.oprtr.org = /var/www/certbot
Nachdem ich meine Konfiguration wie erklärt angepasst habe, konnte ich das Zertifikat erfolgreich erneuern.
Quelle zum Vorschaubild: letsencrypt.org
Autor: Let’s Encrypt
Lizenz: Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
Danke schon! Entschuldigung, meine Deutsch is nicht zehr gut – aber auf English:
I had an identical problem, in this case the certificate covered two subdomains (with and without www.) so I just added two lines in the [[webroot_map]] section and it worked fine.
Haha, you’re welcome. I’m glad i could help. 🙂