tachtler:let_s_encrypt_-_wildcard_zertifikat
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:let_s_encrypt_-_wildcard_zertifikat [2018/08/30 09:06] – [/opt/dehydrated-master/etc/config] klaus | tachtler:let_s_encrypt_-_wildcard_zertifikat [2018/08/30 12:52] (aktuell) – [Generierung] klaus | ||
---|---|---|---|
Zeile 645: | Zeile 645: | ||
Anpassung der einzelnen Pfade bzw. Verzeichnisse, | Anpassung der einzelnen Pfade bzw. Verzeichnisse, | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Nachfolgende Konfigurationsdatei muss mit nachfolgendem Befehl, **neu** angelegt werden und enthält die bis zu **100 Subject Alternative Name (SAN)**, als **Liste** durch **Leerzeichen getrennt**: | ||
+ | < | ||
+ | # touch / | ||
+ | </ | ||
+ | |||
+ | Nachfolgendes Beispiel, zeigt einen möglichen Inhalt der Konfigurationsdatei | ||
+ | * ''/ | ||
+ | < | ||
+ | tachtler.net *.tachtler.net www.dokuwiki.tachtler.net | ||
+ | </ | ||
+ | |||
+ | ===== Konfiguration: | ||
+ | |||
+ | ==== / | ||
+ | |||
+ | Um das erstellte **Zertifikate** und den dazugehörigen **Schlüssel** auch in der Web-Server-Konfiguration einzubinden, | ||
+ | |||
+ | **(Nur relevanter Ausschnitt)**: | ||
+ | |||
+ | <code apache> | ||
+ | ... | ||
+ | # | ||
+ | # Point SSLCertificateFile at a PEM encoded certificate. | ||
+ | # the certificate is encrypted, then you will be prompted for a | ||
+ | # pass phrase. | ||
+ | # | ||
+ | # Tachtler | ||
+ | #default: # SSLCertificateFile / | ||
+ | SSLCertificateFile / | ||
+ | |||
+ | # | ||
+ | # If the key is not combined with the certificate, | ||
+ | # | ||
+ | # | ||
+ | # both in parallel (to also allow the use of DSA ciphers, etc.) | ||
+ | # Tachtler | ||
+ | #default: # SSLCertificateKeyFile / | ||
+ | SSLCertificateKeyFile / | ||
+ | |||
+ | # | ||
+ | # Point SSLCertificateChainFile at a file containing the | ||
+ | # | ||
+ | # | ||
+ | # the referenced file can be the same as SSLCertificateFile | ||
+ | # when the CA certificates are directly appended to the server | ||
+ | # | ||
+ | # Tachtler | ||
+ | #default: # | ||
+ | SSLCertificateChainFile / | ||
+ | |||
+ | # | ||
+ | # Set the CA certificate verification path where to find CA | ||
+ | # | ||
+ | # huge file containing all of them (file must be PEM encoded) | ||
+ | # Tachtler | ||
+ | #default: # | ||
+ | SSLCACertificateFile / | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Abschließend ist ein Neustart des Web-Servers, | ||
+ | < | ||
+ | # systemctl restart httpd.service | ||
+ | </ | ||
+ | |||
+ | ===== Generierung: | ||
+ | |||
+ | Durch nachfolgenden Befehl, wird die Erstellung eines | ||
+ | * **privaten Schlüssels** | ||
+ | * **Zertifikast-Requests** | ||
+ | * **Zertifikats** | ||
+ | und einer | ||
+ | * **einfachen Zertifikatskette** | ||
+ | * **vollständigen Zertifikatskette** | ||
+ | für die Verwendung mit einem Web-Server durchgeführt werden. | ||
+ | |||
+ | :!: **WICHTIG** - Während der Einrichtung und **Test**-Phase, | ||
+ | |||
+ | Deshalb sollte in der Konfigurationsdatei | ||
+ | * ''/ | ||
+ | nachfolgende Einstellung **erst geändert werden, wenn die Test-Phase erfolgreich abgeschlossen ist!** | ||
+ | * <code bash># Tachtler | ||
+ | # default: # | ||
+ | # | ||
+ | # Tachtler - TESTING without LIMITATION - IMPORTANT !!! | ||
+ | CA=" | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ | |||
+ | Hier die Ausgaben, welche durch den Skript lauf erzeugt werden: | ||
+ | < | ||
+ | # / | ||
+ | # INFO: Using main config file / | ||
+ | Processing tachtler.net with alternative names: *.tachtler.net www.dokuwiki.tachtler.net | ||
+ | + Checking domain name(s) of existing cert... changed! | ||
+ | + Domain name(s) are not matching! | ||
+ | + Names in old certificate: | ||
+ | + Configured names: *.tachtler.net tachtler.net www.dokuwiki.tachtler.net | ||
+ | + Forcing renew. | ||
+ | + Checking expire date of existing cert... | ||
+ | + Valid till Oct 2 12:21:13 2018 GMT (Less than 90 days). Renewing! | ||
+ | + Signing domains... | ||
+ | + Generating signing request... | ||
+ | + Requesting new certificate order from CA... | ||
+ | + Received 3 authorizations URLs from the CA | ||
+ | + Handling authorization for tachtler.net | ||
+ | + Handling authorization for tachtler.net | ||
+ | + Handling authorization for www.dokuwiki.tachtler.net | ||
+ | + 3 pending challenge(s) | ||
+ | + Deploying challenge tokens... | ||
+ | |||
+ | Add the following to the zone definition of tachtler.net: | ||
+ | _acme-challenge.tachtler.net. 60 IN TXT " | ||
+ | |||
+ | Press enter to continue... | ||
+ | |||
+ | |||
+ | Add the following to the zone definition of tachtler.net: | ||
+ | _acme-challenge.tachtler.net. 60 IN TXT " | ||
+ | |||
+ | Press enter to continue... | ||
+ | |||
+ | |||
+ | Add the following to the zone definition of www.dokuwiki.tachtler.net: | ||
+ | _acme-challenge.www.dokuwiki.tachtler.net. 60 IN TXT " | ||
+ | |||
+ | Press enter to continue... | ||
+ | |||
+ | + Responding to challenge for tachtler.net authorization... | ||
+ | + Challenge is valid! | ||
+ | + Responding to challenge for tachtler.net authorization... | ||
+ | + Challenge is valid! | ||
+ | + Responding to challenge for www.dokuwiki.tachtler.net authorization... | ||
+ | + Challenge is valid! | ||
+ | + Cleaning challenge tokens... | ||
+ | |||
+ | Now you can remove the following from the zone definition of tachtler.net: | ||
+ | _acme-challenge.tachtler.net. 60 IN TXT " | ||
+ | |||
+ | Press enter to continue... | ||
+ | |||
+ | |||
+ | Now you can remove the following from the zone definition of tachtler.net: | ||
+ | _acme-challenge.tachtler.net. 60 IN TXT " | ||
+ | |||
+ | Press enter to continue... | ||
+ | |||
+ | |||
+ | Now you can remove the following from the zone definition of www.dokuwiki.tachtler.net: | ||
+ | _acme-challenge.www.dokuwiki.tachtler.net. 60 IN TXT " | ||
+ | |||
+ | Press enter to continue... | ||
+ | |||
+ | + Requesting certificate... | ||
+ | + Checking certificate... | ||
+ | + Done! | ||
+ | + Creating fullchain.pem... | ||
+ | + Done! | ||
+ | </ | ||
+ | |||
+ | ^ :!: **WICHTIG** :!: ^ | ||
+ | | **__Immer__** wenn während der **Ausführung des Skripts** nachfolgender Text erscheint: | ||
+ | |||
+ | Anschließend kann mit nachfolgendem Befehl überprüft werden, ob alle benötigten Komponenten, | ||
+ | * **privaten Schlüssels** | ||
+ | * **Zertifikast-Requests** | ||
+ | * **Zertifikat** | ||
+ | * **einfachen Zertifikatskette** | ||
+ | * **vollständigen Zertifikatskette** | ||
+ | erzeugt worden sind: | ||
+ | < | ||
+ | # ls -l / | ||
+ | / | ||
+ | total 24 | ||
+ | -rw------- 1 root root 1704 Aug 30 09:12 cert-1535613155.csr | ||
+ | -rw------- 1 root root 2508 Aug 30 09:12 cert-1535613155.pem | ||
+ | lrwxrwxrwx 1 root root 19 Aug 30 09:12 cert.csr -> cert-1535613155.csr | ||
+ | lrwxrwxrwx 1 root root 19 Aug 30 09:12 cert.pem -> cert-1535613155.pem | ||
+ | -rw------- 1 root root 1680 Aug 30 09:12 chain-1535613155.pem | ||
+ | lrwxrwxrwx 1 root root 20 Aug 30 09:12 chain.pem -> chain-1535613155.pem | ||
+ | -rw------- 1 root root 4188 Aug 30 09:12 fullchain-1535613155.pem | ||
+ | lrwxrwxrwx 1 root root 24 Aug 30 09:12 fullchain.pem -> fullchain-1535613155.pem | ||
+ | -rw------- 1 root root 3243 Aug 30 09:12 privkey-1535613155.pem | ||
+ | lrwxrwxrwx 1 root root 22 Aug 30 09:12 privkey.pem -> privkey-1535613155.pem | ||
+ | </ | ||
+ | |||
+ | :!: **HINWEIS** - Hier ist ebenfalls schön zu sehen, da jeweils **symbolische Links** erstellt wurden, was bei einer erneuten Generierung **__keine__** Konfiguration in den Web-Server Konfigurationsdateien nach sich zieht, da nur die symblischen Links angepasst werden! | ||
+ | |||
+ | ===== Generierung ===== | ||
+ | |||
+ | Wie auch bei der Generierung des Zertifikas gegen die [[https:// | ||
+ | |||
+ | :!: **WICHTIG** - Während der Einrichtung und **Test**-Phase, | ||
+ | |||
+ | Deshalb sollte in der Konfigurationsdatei | ||
+ | * ''/ | ||
+ | nachfolgende Einstellung **jetzt geändert werden, wenn die Test-Phase erfolgreich abgeschlossen ist!** | ||
+ | * <code bash># Tachtler | ||
+ | # default: # | ||
+ | CA=" | ||
+ | # Tachtler - TESTING without LIMITATION - IMPORTANT !!! | ||
+ | # | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ | |||
+ | Nach dem ersten Versuch die Erstellung des Zertifikats durchzuführen, | ||
+ | < | ||
+ | # / | ||
+ | # INFO: Using main config file / | ||
+ | |||
+ | To use dehydrated with this certificate authority you have to agree to their terms of service which you can find here: https:// | ||
+ | |||
+ | To accept these terms of service run `/ | ||
+ | </ | ||
+ | |||
+ | Hier ist, wie angegeben die **Registrierung** und das Akzeptieren der **Bedingungen** von [[https:// | ||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ |
tachtler/let_s_encrypt_-_wildcard_zertifikat.1535612781.txt.gz · Zuletzt geändert: 2018/08/30 09:06 von klaus