Certbot-Beispiel: Zertifikat für Apache ausstellen und installieren
Command syntax
Verwenden Sie an der Befehlszeilenaufforderung die folgende Befehlssyntax, um ein Zertifikat für den Apache-Webserver auszustellen und zu installieren:
sudo certbot --apache --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}
Geben Sie die Werte der Befehlsoptionen wie folgt ein:
Command argument | Description |
---|---|
| The EAB key identifier (KID). For CertCentral. accounts, use ACME credentialsi. |
| The EAB HMAC key. |
| For CertCentral accounts, use https://one.digicert.com/mpki/api/v1/acme/v2/directory |
| Local path to Certbot configuration files for the current application. These files control how and where Certbot installs certificates. If |
| The fully qualified domain name (FQDN) to secure the certificate. Use -d for each domain; the first entry becomes the common name (CN). |
Example command:
sudo certbot --apache --register-unsafely-without-email --eab-kid zcwmKf9sCnDUZsbCOgnv1ijy46l6UeEYCavSQQirl-g --eab-hmac-key RHZraHBXQUxWTEFGdFhndjRVNmV3S3F6c2VNZDM1QzRURGhjdHF3S1NublJjN3dhVUFObzA0SXJwVHBnU2xnRA --server https://one.digicert.com/mpki/api/v1/acme/v2/directory --config-dir /usr/local/certbot/my_webserver_config/ -d my.host -d alias.my.host
Usage notes
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.This command only works for OV/EV certificates for which the domain has been prevalidated in CertCentral. To issue DV certificates, or to issue OV/EV certificates when the domain is not prevalidated, you must use additional options to validate the domain dynamically through Certbot. For examples, see here (DNS-01 validation method) and here (HTTP-01 validation method).