Skip to main content

Certbot-voorbeeld: certificaat voor NGINX uitgeven en installeren met behulp van DNS-01-domeinvalidatie

Command syntax

Gebruik bij de opdrachtregelprompt de onderstaande opdrachtsyntaxis om een openbaar DV/OV/EV-certificaat uit te geven en te installeren voor de NGINX-webserver, waarbij domeincontrolevalidatie wordt aangevraagd via DNS-01:

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 dns

Fill in values for the command arguments shown in curly braces, as described below:

Command argument

Description

{MY-KEY-IDENTIFIER}

The EAB key identifier (KID). For CertCentral. accounts, use ACME credentialsi.

{MY-HMAC-KEY}

The EAB HMAC key.

{ACME-URL}

For CertCentral accounts, use https://one.digicert.com/mpki/api/v1/acme/v2/directory

{MY-CONFIG-DIR}

Local path to Certbot configuration files for the current application. These files control how and where Certbot installs certificates. If --config-dir is omitted, Certbot defaults to /etc/letsencrypt.

{FQDN}

The fully qualified domain name (FQDN) to secure the certificate. Use -d for each domain; the first entry becomes the common name (CN).

Voorbeeld commando:

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

  • Voor OV/EV-certificaten worden domeinvalidatiecontroles alleen afgehandeld door het ACME-protocol als het domein nog niet vooraf is gevalideerd in CertCentral. Als het domein is vooraf gevalideerd, waarna CertCentral het domein zelf valideert, out-of-band en onafhankelijk van het ACME-protocol.

  • For DV certificates, and for OV/EV certificates that are not prevalidated, the --preferred-challenges option specifies the preferred form of ACME-based domain validation. Enter dns here to request DNS-01 validation.

  • De --manual optie betekent dat u handmatig een DNS-record aan uw domein toevoegt voor de validatie-uitdaging.

  • Deze opdracht wordt interactief uitgevoerd. Certbot levert de benodigde DNS-validatieparameters, die als TXT DNS-record moeten worden toegevoegd. Bijvoorbeeld:

    _acme-challenge.example.com. 300 IN TXT "mJ9ffxp9pX...f0EDcZZ_klG5wWD1"
  • Nadat de TXT DNS-record is geplaatst, wordt de opdracht voltooid en wordt het certificaat gevalideerd, uitgegeven en geïnstalleerd.

  • Als het aangevraagde certificaat overeenkomt met een bestaande bestelling, CertCentral past de standaardautomatiseringsactie toe voor die bestelling (zie ACME-automatiseringsacties). Als er geen overeenkomende bestelling is, of als de ACME-URL dit bevat ?action=enroll, CertCentral behandelt het als een nieuwe bestelling en registreert het nieuwe certificaat voor u.