Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:let_s_encrypt_-_wildcard_zertifikat

Dies ist eine alte Version des Dokuments!


Let's Encrypt - Wildcard Zertifikat

Let's Encrypt ist eine kostenlose, automatisierte und offene Zertifizierungsstelle (CA), welche offiziell dem Nutzen der Öffentlichkeit dienen soll. Let's Encrypt ist ein Service der von der Internet Security Research Group (ISRG) zur Verfügung gestellt wird.

Let's Encrypt bietet öffentlich, jedermann digitalen Zertifikate an, um HTTPS (SSL / TLS) Verschlüsselung für Websites zu ermöglichen. Dies wird kostenlos und in einer möglichst benutzerfreundlichen Art und Weise angeboten. Let's Encrypt tut dies, weil Let's Encrypt offiziell ein sichereres und die Privatsphäre respektierendes Internet fördern möchte.

:!: WICHTIG - Das Ausstellen von Wildcard-Zertifikaten durch Let's Encrypt ist nur möglich, wenn

  • zeitnah DNS-Einträge
  • auf dem für die Domäne zuständigen DNS-Server

durchgeführt werden können !!!

Vorbereitung

Nachfolgend soll die Erstellung eines

  • privaten Schlüssels
  • Zertifikast-Requests
  • Zertifikats

für die Verwendung mit einem Web-Server durchgeführt werden.

Dabei soll das Zertifikat auch Aliase enthalten, so das dieses auch in mehreren virtuellen Hosts eingesetzt werden kann.

Die Erstellung soll durch Verwendung von nachfolgendem Skript durchgeführt werden:

welches unter oben stehendem externen Link heruntergeladen werden kann.

Herunterladen

Nachfolgendes Skript von Lukas Schauer soll dazu verwendet werden, um ohne Unterbrechung des Web-Server Betriebs Zertifikate ausstellen und verlängern zu können.

:!: HINWEIS - Beim Einsatz des Standard-Clients von Let's Encrypt mit dem Namen certbot sind gewisse Einschränkungen gegeben, bzw. dessen Konfiguration ist nicht so komfortabel.

Nachfolgender Befehl, wechselt in das Verzeichnis /opt, in dem auch hier alle weiteren Konfigurationen und Aktionen durchgeführt werden sollen, damit alle benötigten Komponenten später, zentral an einem Speicherort zu finden sind, was meiner Meinung nach die Handhabung insgesamt vereinfacht.

# cd /opt

Anschliessend kann mit nachfolgendem Befehl das Skript dehydrated unter Angabe eines Ziel-Verzeichnisses und eines abweichenden Namen, unter dem die heruntergeladene Datei gespeichert werden soll, heruntergeladen werden:

# wget -P /opt -O dehydrated.zip https://github.com/lukas2511/dehydrated/archive/master.zip
--2016-09-16 06:27:03--  https://github.com/lukas2511/dehydrated/archive/master.zip
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/lukas2511/dehydrated/zip/master [following]
--2016-09-16 06:27:03--  https://codeload.github.com/lukas2511/dehydrated/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 75042 (73K) [application/zip]
Saving to: ‘dehydrated.zip’

100%[======================================>] 75,042       233KB/s   in 0.3s   

2016-09-16 06:27:04 (233 KB/s) - ‘dehydrated.zip’ saved [75042/75042]

Installation

Ab hier werden root-Rechte zur Ausführung der nachfolgenden Befehle benötigt. Um root zu werden geben Sie bitte folgenden Befehl ein:

$ su -
Password: 

Mit nachfolgendem Befehl, kann nun die zuvor heruntergeladene Archivdatei dehydrated.zip in das Verzeichnis /opt entpackt werden:

# unzip -d /opt dehydrated.zip 
Archive:  dehydrated.zip
caeed7d5e306c339e80b7e242db1b1ee98f9a6ca
   creating: /opt/dehydrated-master/
  inflating: /opt/dehydrated-master/.gitignore  
  inflating: /opt/dehydrated-master/.travis.yml  
  inflating: /opt/dehydrated-master/CHANGELOG  
  inflating: /opt/dehydrated-master/LICENSE  
  inflating: /opt/dehydrated-master/README.md  
  inflating: /opt/dehydrated-master/dehydrated  
   creating: /opt/dehydrated-master/docs/
  inflating: /opt/dehydrated-master/docs/dns-verification.md  
  inflating: /opt/dehydrated-master/docs/domains_txt.md  
  inflating: /opt/dehydrated-master/docs/ecc.md  
   creating: /opt/dehydrated-master/docs/examples/
  inflating: /opt/dehydrated-master/docs/examples/config  
  inflating: /opt/dehydrated-master/docs/examples/domains.txt  
  inflating: /opt/dehydrated-master/docs/examples/hook.sh  
  inflating: /opt/dehydrated-master/docs/hook_chain.md  
  inflating: /opt/dehydrated-master/docs/import-from-official-client.md  
  inflating: /opt/dehydrated-master/docs/logo.jpg  
  inflating: /opt/dehydrated-master/docs/per-certificate-config.md  
  inflating: /opt/dehydrated-master/docs/staging.md  
  inflating: /opt/dehydrated-master/docs/troubleshooting.md  
  inflating: /opt/dehydrated-master/docs/wellknown.md  
  inflating: /opt/dehydrated-master/test.sh

Anschliessend sollten nun nachfolgende Verzeichnisse und Dateien entstanden sein, was mit folgendem Befehl überprüft werden kann und in etwa die folgende Ausgabe erzeugen sollte:

# ls -l *
-rw-r--r-- 1 root root 75042 Sep 16 06:27 dehydrated.zip

dehydrated-master:
total 64
-rw-r--r-- 1 root root  1898 Sep 14 15:11 CHANGELOG
-rwxr-xr-x 1 root root 39373 Sep 14 15:11 dehydrated
drwxr-xr-x 3 root root  4096 Sep 14 15:11 docs
-rw-r--r-- 1 root root  1085 Sep 14 15:11 LICENSE
-rw-r--r-- 1 root root  3690 Sep 14 15:11 README.md
-rwxr-xr-x 1 root root  8004 Sep 14 15:11 test.sh

Als abschliessenden Schritt der Installation, soll nun ebenfalls unter dem Verzeichnis /opt eine Ordnerstruktur mit nachfolgendem Befehl angelegt werden:

# mkdir -p /opt/dehydrated-master/{alpn-certs,accounts,certs,etc,hook,work,www}

Abschliessend ist noch eine Änderung der Besitzrechte für eines der eben neu angelegten Verzeichnisse erforderlich, was mit nachfolgendem Befehl durchgeführt werden kann:

# chown -R apache:apache /opt/dehydrated-master/www

Mit nachfolgendem Befehl, kann nun überprüft werden, ob alle benötigten Verzeichnisse erstellt worden sind. Dies sollte in etwa wie folgt aussehen:

# ls -l *
-rw-r--r-- 1 root root 75042 Sep 16 06:27 dehydrated.zip

dehydrated-master:
total 64
drwxr-xr-x 2 root   root       6 Sep 16 08:21 accounts
drwxr-xr-x 2 root   root       6 Sep 16 08:21 alpn-certs
drwxr-xr-x 2 root   root       6 Sep 16 08:21 certs
drwxr-xr-x 2 root   root       6 Sep 16 08:21 chains
-rw-r--r-- 1 root   root    1898 Sep 14 15:11 CHANGELOG
-rwxr-xr-x 1 root   root   39373 Sep 14 15:11 dehydrated
drwxr-xr-x 3 root   root    4096 Sep 14 15:11 docs
drwxr-xr-x 2 root   root       6 Sep 16 08:21 etc
drwxr-xr-x 2 root   root       6 Sep 16 08:21 hook
-rw-r--r-- 1 root   root    1085 Sep 14 15:11 LICENSE
-rw-r--r-- 1 root   root    3690 Sep 14 15:11 README.md
-rwxr-xr-x 1 root   root    8004 Sep 14 15:11 test.sh
drwxr-xr-x 2 root   root       6 Sep 16 08:21 work
drwxr-xr-x 2 apache apache     6 Sep 16 08:21 www

Konfiguration: dehydrated

/opt/dehydrated-master/hook/hook.sh

Nachfolgendes shell-Script muss durch kopieren einer der in der Installation mitgelieferten Beispiel shell-Skript-Datei erstellt werden, was mit nachfolgendem Befehl durchgeführt werden kann:

# cp -a /opt/dehydrated-master/docs/examples/hook.sh /opt/dehydrated-master/hook/hook.sh

Anschließend muss das shell-Skript wie folgt angepasst werden, damit dieses, wie hier beschriebene shell-Skript und dessen Anpassungen bzw. Konfiguration, funktionsfähig ist:

(Komplette Konfigurationsdatei)

#!/usr/bin/env bash
 
deploy_challenge() {
    local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}"
 
    # This hook is called once for every domain that needs to be
    # validated, including any alternative names you may have listed.
    #
    # Parameters:
    # - DOMAIN
    #   The domain name (CN or subject alternative name) being
    #   validated.
    # - TOKEN_FILENAME
    #   The name of the file containing the token to be served for HTTP
    #   validation. Should be served by your web server as
    #   /.well-known/acme-challenge/${TOKEN_FILENAME}.
    # - TOKEN_VALUE
    #   The token value that needs to be served for validation. For DNS
    #   validation, this is what you want to put in the _acme-challenge
    #   TXT record. For HTTP validation it is the value that is expected
    #   be found in the $TOKEN_FILENAME file.
 
    # Simple example: Use nsupdate with local named
    # printf 'server 127.0.0.1\nupdate add _acme-challenge.%s 300 IN TXT "%s"\nsend\n' "${DOMAIN}" "${TOKEN_VALUE}" | nsupdate -k /var/run/named/session.key
 
    # Tachtler
    echo ""
    echo "Add the following to the zone definition of ${DOMAIN}:"
    echo "_acme-challenge.${DOMAIN}. 60 IN TXT \"${TOKEN_VALUE}\""
    echo ""
    echo -n "Press enter to continue..."
    read tmp
    echo ""
}
 
clean_challenge() {
    local DOMAIN="${1}" TOKEN_FILENAME="${2}" TOKEN_VALUE="${3}"
 
    # This hook is called after attempting to validate each domain,
    # whether or not validation was successful. Here you can delete
    # files or DNS records that are no longer needed.
    #
    # The parameters are the same as for deploy_challenge.
 
    # Simple example: Use nsupdate with local named
    # printf 'server 127.0.0.1\nupdate delete _acme-challenge.%s TXT "%s"\nsend\n' "${DOMAIN}" "${TOKEN_VALUE}" | nsupdate -k /var/run/named/session.key
 
    # Tachtler
    echo ""
    echo "Now you can remove the following from the zone definition of ${DOMAIN}:"
    echo "_acme-challenge.${DOMAIN}. 60 IN TXT \"${TOKEN_VALUE}\""
    echo ""
    echo -n "Press enter to continue..."
    read tmp
    echo ""
}
 
deploy_cert() {
    local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}" TIMESTAMP="${6}"
 
    # This hook is called once for each certificate that has been
    # produced. Here you might, for instance, copy your new certificates
    # to service-specific locations and reload the service.
    #
    # Parameters:
    # - DOMAIN
    #   The primary domain name, i.e. the certificate common
    #   name (CN).
    # - KEYFILE
    #   The path of the file containing the private key.
    # - CERTFILE
    #   The path of the file containing the signed certificate.
    # - FULLCHAINFILE
    #   The path of the file containing the full certificate chain.
    # - CHAINFILE
    #   The path of the file containing the intermediate certificate(s).
    # - TIMESTAMP
    #   Timestamp when the specified certificate was created.
 
    # Simple example: Copy file to nginx config
    # cp "${KEYFILE}" "${FULLCHAINFILE}" /etc/nginx/ssl/; chown -R nginx: /etc/nginx/ssl
    # systemctl reload nginx
}
 
deploy_ocsp() {
    local DOMAIN="${1}" OCSPFILE="${2}" TIMESTAMP="${3}"
 
    # This hook is called once for each updated ocsp stapling file that has
    # been produced. Here you might, for instance, copy your new ocsp stapling
    # files to service-specific locations and reload the service.
    #
    # Parameters:
    # - DOMAIN
    #   The primary domain name, i.e. the certificate common
    #   name (CN).
    # - OCSPFILE
    #   The path of the ocsp stapling file
    # - TIMESTAMP
    #   Timestamp when the specified ocsp stapling file was created.
 
    # Simple example: Copy file to nginx config
    # cp "${OCSPFILE}" /etc/nginx/ssl/; chown -R nginx: /etc/nginx/ssl
    # systemctl reload nginx
}
 
 
unchanged_cert() {
    local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
 
    # This hook is called once for each certificate that is still
    # valid and therefore wasn't reissued.
    #
    # Parameters:
    # - DOMAIN
    #   The primary domain name, i.e. the certificate common
    #   name (CN).
    # - KEYFILE
    #   The path of the file containing the private key.
    # - CERTFILE
    #   The path of the file containing the signed certificate.
    # - FULLCHAINFILE
    #   The path of the file containing the full certificate chain.
    # - CHAINFILE
    #   The path of the file containing the intermediate certificate(s).
}
 
invalid_challenge() {
    local DOMAIN="${1}" RESPONSE="${2}"
 
    # This hook is called if the challenge response has failed, so domain
    # owners can be aware and act accordingly.
    #
    # Parameters:
    # - DOMAIN
    #   The primary domain name, i.e. the certificate common
    #   name (CN).
    # - RESPONSE
    #   The response that the verification server returned
 
    # Simple example: Send mail to root
    # printf "Subject: Validation of ${DOMAIN} failed!\n\nOh noez!" | sendmail root
}
 
request_failure() {
    local STATUSCODE="${1}" REASON="${2}" REQTYPE="${3}" HEADERS="${4}"
 
    # This hook is called when an HTTP request fails (e.g., when the ACME
    # server is busy, returns an error, etc). It will be called upon any
    # response code that does not start with '2'. Useful to alert admins
    # about problems with requests.
    #
    # Parameters:
    # - STATUSCODE
    #   The HTML status code that originated the error.
    # - REASON
    #   The specified reason for the error.
    # - REQTYPE
    #   The kind of request that was made (GET, POST...)
    # - HEADERS
    #   HTTP headers returned by the CA
 
    # Simple example: Send mail to root
    # printf "Subject: HTTP request failed failed!\n\nA http request failed with status ${STATUSCODE}!" | sendmail root
}
 
generate_csr() {
    local DOMAIN="${1}" CERTDIR="${2}" ALTNAMES="${3}"
 
    # This hook is called before any certificate signing operation takes place.
    # It can be used to generate or fetch a certificate signing request with external
    # tools.
    # The output should be just the cerificate signing request formatted as PEM.
    #
    # Parameters:
    # - DOMAIN
    #   The primary domain as specified in domains.txt. This does not need to
    #   match with the domains in the CSR, it's basically just the directory name.
    # - CERTDIR
    #   Certificate output directory for this particular certificate. Can be used
    #   for storing additional files.
    # - ALTNAMES
    #   All domain names for the current certificate as specified in domains.txt.
    #   Again, this doesn't need to match with the CSR, it's just there for convenience.
 
    # Simple example: Look for pre-generated CSRs
    # if [ -e "${CERTDIR}/pre-generated.csr" ]; then
    #   cat "${CERTDIR}/pre-generated.csr"
    # fi
}
 
startup_hook() {
  # This hook is called before the cron command to do some initial tasks
  # (e.g. starting a webserver).
 
  :
}
 
exit_hook() {
  # This hook is called at the end of the cron command and can be used to
  # do some final (cleanup or other) tasks.
 
  :
}
 
HANDLER="$1"; shift
if [[ "${HANDLER}" =~ ^(deploy_challenge|clean_challenge|deploy_cert|deploy_ocsp|unchanged_cert|invalid_challenge|request_failure|generate_csr|startup_hook|exit_hook)$ ]]; then
  "$HANDLER" "$@"
fi

Erklärungen:

  • # Tachtler
        echo ""
        echo "Add the following to the zone definition of ${DOMAIN}:"
        echo "_acme-challenge.${DOMAIN}. 60 IN TXT \"${TOKEN_VALUE}\""
        echo ""
        echo -n "Press enter to continue..."
        read tmp
        echo ""

Im Bereich deploy_challenge() wird die formatierte Ausgabe des DNS-Eintrags auf der shell-Konsole ausgegeben und eine Warteschleife wird ausgeführt, solange bis die [ENTER/RETURN]-Taste gedrückt wird.

:!: HINWEIS - Dies ist das Zeitfenster, in dem die DNS-Einträge auf dem DNS-Server erstellt werden müssen!

  • # Tachtler
        echo ""
        echo "Now you can remove the following from the zone definition of ${DOMAIN}:"
        echo "_acme-challenge.${DOMAIN}. 60 IN TXT \"${TOKEN_VALUE}\""
        echo ""
        echo -n "Press enter to continue..."
        read tmp
        echo ""

Im Bereich clean_challenge() wird die formatierte Ausgabe des DNS-Eintrags auf der shell-Konsole ausgegeben und eine Warteschleife wird ausgeführt, solange bis die [ENTER/RETURN]-Taste gedrückt wird.

:!: HINWEIS - Dies ist das Zeitfenster, in dem die DNS-Einträge von dem DNS-Server wieder gelöscht werden sollten!

/opt/dehydrated-master/etc/config

Nachfolgende Konfigurationsdatei muss durch kopieren einer der in der Installation mitgelieferten Beispiel Konfigurationsdatei erstellt werden, was mit nachfolgendem Befehl durchgeführt werden kann:

# cp -a /opt/dehydrated-master/docs/examples/config /opt/dehydrated-master/etc/config

Anschließend muss die Konfigurationsdatei wie folgt angepasst werden, damit diese, hier beschriebene Installation und Konfiguration, funktionsfähig ist:

(Komplette Konfigurationsdatei)

########################################################
# This is the main config file for dehydrated          #
#                                                      #
# This file is looked for in the following locations:  #
# $SCRIPTDIR/config (next to this script)              #
# /usr/local/etc/dehydrated/config                     #
# /etc/dehydrated/config                               #
# ${PWD}/config (in current working-directory)         #
#                                                      #
# Default values of this config are in comments        #
########################################################
 
# Which user should dehydrated run as? This will be implictly enforced when running as root
#DEHYDRATED_USER=
 
# Which group should dehydrated run as? This will be implictly enforced when running as root
#DEHYDRATED_GROUP=
 
# Resolve names to addresses of IP version only. (curl)
# supported values: 4, 6
# default: <unset>
# Tachtler
# default: #IP_VERSION=
IP_VERSION=4
 
# Path to certificate authority (default: https://acme-v02.api.letsencrypt.org/directory)
# Tachtler
# default: #CA="https://acme-v02.api.letsencrypt.org/directory"
#CA="https://acme-v02.api.letsencrypt.org/directory"
# Tachtler - TESTING without LIMITATION - IMPORTANT !!!
CA="https://acme-staging-v02.api.letsencrypt.org/directory"
 
# Path to old certificate authority
# Set this value to your old CA value when upgrading from ACMEv1 to ACMEv2 under a different endpoint.
# If dehydrated detects an account-key for the old CA it will automatically reuse that key
# instead of registering a new one.
# default: https://acme-v01.api.letsencrypt.org/directory
#OLDCA="https://acme-v01.api.letsencrypt.org/directory"
 
# Which challenge should be used? Currently http-01, dns-01 and tls-alpn-01 are supported
# Tachtler
# default: #CHALLENGETYPE="http-01"
CHALLENGETYPE="dns-01"
 
# Path to a directory containing additional config files, allowing to override
# the defaults found in the main configuration file. Additional config files
# in this directory needs to be named with a '.sh' ending.
# default: <unset>
#CONFIG_D=
 
# Base directory for account key, generated certificates and list of domains (default: $SCRIPTDIR -- uses config directory if undefined)
# Tachtler
# default: #BASEDIR=$SCRIPTDIR
BASEDIR="${SCRIPTDIR}/work"
 
# File containing the list of domains to request certificates for (default: $BASEDIR/domains.txt)
# Tachtler
# default: #DOMAINS_TXT="${BASEDIR}/domains.txt"
DOMAINS_TXT="${SCRIPTDIR}/etc/domains.txt"
 
# Output directory for generated certificates
# Tachtler
# default: #CERTDIR="${BASEDIR}/certs"
CERTDIR="${SCRIPTDIR}/certs"
 
# Output directory for alpn verification certificates
# Tachtler
# default: #ALPNCERTDIR="${BASEDIR}/alpn-certs"
ALPNCERTDIR="${SCRIPTDIR}/alpn-certs"
 
# Directory for account keys and registration information
# Tachtler
# default: #ACCOUNTDIR="${BASEDIR}/accounts"
ACCOUNTDIR="${SCRIPTDIR}/accounts"
 
# Output directory for challenge-tokens to be served by webserver or deployed in HOOK (default: /var/www/dehydrated)
# Tachtler
# default: #WELLKNOWN="/var/www/dehydrated"
WELLKNOWN="${SCRIPTDIR}/www"
 
# Default keysize for private keys (default: 4096)
#KEYSIZE="4096"
 
# Path to openssl config file (default: <unset> - tries to figure out system default)
#OPENSSL_CNF=
 
# Path to OpenSSL binary (default: "openssl")
#OPENSSL="openssl"
 
# Extra options passed to the curl binary (default: <unset>)
#CURL_OPTS=
 
# Program or function called in certain situations
#
# After generating the challenge-response, or after failed challenge (in this case altname is empty)
# Given arguments: clean_challenge|deploy_challenge altname token-filename token-content
#
# After successfully signing certificate
# Given arguments: deploy_cert domain path/to/privkey.pem path/to/cert.pem path/to/fullchain.pem
#
# BASEDIR and WELLKNOWN variables are exported and can be used in an external program
# default: <unset>
# Tachtler
# default: #HOOK=
HOOK="${SCRIPTDIR}/hook/hook.sh"
 
# Chain clean_challenge|deploy_challenge arguments together into one hook call per certificate (default: no)
#HOOK_CHAIN="no"
 
# Minimum days before expiration to automatically renew certificate (default: 30)
# Tachtler
# default: #RENEW_DAYS="30"
RENEW_DAYS="90"
 
# Regenerate private keys instead of just signing new certificates on renewal (default: yes)
# Tachtler
# See: https://legacy.thomas-leister.de/lets-encrypt-mit-hpkp-und-dane/
# default: #PRIVATE_KEY_RENEW="yes"
PRIVATE_KEY_RENEW="no"
 
# Create an extra private key for rollover (default: no)
#PRIVATE_KEY_ROLLOVER="no"
 
# Which public key algorithm should be used? Supported: rsa, prime256v1 and secp384r1
#KEY_ALGO=rsa
 
# E-mail to use during the registration (default: <unset>)
# Tachtler
# default: #CONTACT_EMAIL=
CONTACT_EMAIL=hostmaster@tachtler.net
 
# Lockfile location, to prevent concurrent access (default: $BASEDIR/lock)
#LOCKFILE="${BASEDIR}/lock"
 
# Option to add CSR-flag indicating OCSP stapling to be mandatory (default: no)
#OCSP_MUST_STAPLE="no"
 
# Fetch OCSP responses (default: no)
#OCSP_FETCH="no"
 
# OCSP refresh interval (default: 5 days)
#OCSP_DAYS=5
 
# Issuer chain cache directory (default: $BASEDIR/chains)
# Tachtler
# default: #CHAINCACHE="${BASEDIR}/chains"
CHAINCACHE="${SCRIPTDIR}/chains"
 
# Automatic cleanup (default: no)
#AUTO_CLEANUP="no"
 
# ACME API version (default: auto)
#API=auto

Erklärungen:

  • IP_VERSION=4

Die Kommunikation mit den Let's Encrypt-Servern soll hier via IP Version 4 erfolgen.

  • # Tachtler
    # default: #CA="https://acme-v02.api.letsencrypt.org/directory"
    #CA="https://acme-v02.api.letsencrypt.org/directory"
    # Tachtler - TESTING without LIMITATION - IMPORTANT !!!
    CA="https://acme-staging-v02.api.letsencrypt.org/directory"

Während der Einrichtung und Test-Phase, sollte nicht gegen die Produktiven Systeme von Let's Encrypt getestet werden, da hier relativ rasch ein Resourcen-Limit von Anfragen in einer bestimmten Zeit greift. Erst wenn das Skript voll funktionsfähig und getestet ist und alle Konfigurationen entsprechend abgeschlossen sind, sollte hier dann das Produktive System von Let's Encrypt konfiguriert werden!

  • # Base directory for account key, generated certificates and list of domains (default: $SCRIPTDIR -- uses config directory if undefined)
    # Tachtler
    # default: #BASEDIR=$SCRIPTDIR
    BASEDIR="${SCRIPTDIR}/work"
     
    # File containing the list of domains to request certificates for (default: $BASEDIR/domains.txt)
    # Tachtler
    # default: #DOMAINS_TXT="${BASEDIR}/domains.txt"
    DOMAINS_TXT="${SCRIPTDIR}/etc/domains.txt"
     
    # Output directory for generated certificates
    # Tachtler
    # default: #CERTDIR="${BASEDIR}/certs"
    CERTDIR="${SCRIPTDIR}/certs"
     
    # Output directory for alpn verification certificates
    # Tachtler
    # default: #ALPNCERTDIR="${BASEDIR}/alpn-certs"
    ALPNCERTDIR="${SCRIPTDIR}/alpn-certs"
     
    # Directory for account keys and registration information
    # Tachtler
    # default: #ACCOUNTDIR="${BASEDIR}/accounts"
    ACCOUNTDIR="${SCRIPTDIR}/accounts"
     
    # Output directory for challenge-tokens to be served by webserver or deployed in HOOK (default: /var/www/dehydrated)
    # Tachtler
    # default: #WELLKNOWN="/var/www/dehydrated"
    WELLKNOWN="${SCRIPTDIR}/www"

Anpassung der einzelnen Pfade bzw. Verzeichnisse, in denen die verschiedenen Dateien dann permanent, oder temporär abgelegt werden sollen.

:!: HINWEIS - Diese Konfiguration entspricht der zuvor angelegten Verzeichnisstruktur!

  • RENEW_DAYS="90"

Leufzeit bzw. Gültigkeit durch Let's Encrypt ausgestellten Zertifikate.

:!: HINWEIS - Hier können maximal 90 Tage eingestellt werden!

  • PRIVATE_KEY_RENEW="no"

Deaktiviert die Erstellung eines neuen privaten Schlüssels, bei jeder Zertifikatserneuerung.

:!: HINWEIS - Der private Schlüssel sollte trotzdem von Zeit zu Zeit z.B. 1 x Jahr erneuert werden!

  • CONTACT_EMAIL=hostmaster@tachtler.net

E-Mail-Adresse welche als Kontakt dienen soll.

  • # Issuer chain cache directory (default: $BASEDIR/chains)
    # Tachtler
    # default: #CHAINCACHE="${BASEDIR}/chains"
    CHAINCACHE="${SCRIPTDIR}/chains"

Anpassung der einzelnen Pfade bzw. Verzeichnisse, in denen die verschiedenen Dateien dann permanent, oder temporär abgelegt werden sollen.

Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
tachtler/let_s_encrypt_-_wildcard_zertifikat.1535612512.txt.gz · Zuletzt geändert: 2018/08/30 09:01 von klaus