Certbot-Beispiel: Zertifikat für NGINX mithilfe der DNS-01-Domänenvalidierung ausstellen und installieren
Command syntax
Verwenden Sie an der Befehlszeilenaufforderung die folgende Befehlssyntax, um ein öffentliches DV/OV/EV-Zertifikat für den NGINX-Webserver auszustellen und zu installieren und eine Domänenkontrollvalidierung über DNS-01 anzufordern:
sudo certbot --nginx --register-unsafely-without-email --eab-kid {MY-KEY-IDENTIFIER} --eab-hmac-key {MY-HMAC-KEY} --server {ACME-URL} --config-dir {MY-CONFIG-DIR} -d {FQDN} --manual --preferred-challenges dnsFill in values for the command arguments shown in curly braces, as described below:
Command argument | Description |
|---|---|
| The EAB key identifier (KID). For CertCentral. accounts, use ACME credentialsi. |
For DigiCert® Trust Lifecycle Manager. accounts, use certificate profile. | Use the EAB HMAC key. |
| For CertCentral accounts, use https://one.digicert.com/mpki/api/v1/acme/v2/directory |
| Use the local path to Certbot configuration files for the current application. |
| Use the fully qualified domain name (FQDN) to secure the certificate. |
Beispielbefehl:
sudo certbot --nginx --register-unsafely-without-email --eab-kid zcskpf8sCnHGBsbCOgnv1ijy00l6UeEYCavSSSirl-k --eab-hmac-key DDDraHBXQUxWTEFGdFhndjRVNmV4t4F6c2VNZDM1QzRURGhjdHF3S1NublJjN0dhVUFObzA0SXJwVHBnU2yyUH --server https://one.digicert.com/mpki/api/v1/acme/v2/directory --config-dir /usr/local/certbot/my_public_webserver_config/ -d example.com -d www.example.com --manual --preferred-challenges dns
Usage notes
Bei OV/EV-Zertifikaten werden Domänenvalidierungsprüfungen nur dann vom ACME-Protokoll durchgeführt, wenn die Domäne nicht bereits in CertCentral vorab validiert wurde. Wenn die Domäne Ist Vorab validiert, dann validiert CertCentral die Domäne selbst, Out-of-Band und unabhängig vom ACME-Protokoll.
For DV certificates, and for OV/EV certificates that are not prevalidated, the
--preferred-challengesoption specifies the preferred form of ACME-based domain validation. Enterdnshere to request DNS-01 validation.Der
--manualOption bedeutet, dass Sie Ihrer Domain für die Validierungsherausforderung manuell einen DNS-Eintrag hinzufügen.Dieser Befehl wird interaktiv ausgeführt. Certbot stellt die erforderlichen DNS-Validierungsparameter bereit, die als TXT-DNS-Eintrag hinzugefügt werden müssen. Zum Beispiel:
Nachdem der TXT-DNS-Eintrag vorhanden ist, wird der Befehl abgeschlossen und das Zertifikat validiert, ausgestellt und installiert.
Wenn das angeforderte Zertifikat mit einer bestehenden Bestellung übereinstimmt, CertCentral wendet die Standardautomatisierungsaktion für diese Bestellung an (siehe ACME-Automatisierungsaktionen). Wenn es keine passende Bestellung gibt oder wenn die ACME-URL Folgendes enthält
?action=enroll, CertCentral behandelt es als neue Bestellung und registriert das neue Zertifikat für Sie.