lets_encrypt
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
lets_encrypt [01.01.2021 08:33] – [Erstinstallation] thooge | lets_encrypt [20.11.2023 16:13] (aktuell) – thooge | ||
---|---|---|---|
Zeile 8: | Zeile 8: | ||
- Installation des Scripts und der Umgebung< | - Installation des Scripts und der Umgebung< | ||
- | cd / | + | apt-get install |
- | git clone https:// | + | |
mkdir / | mkdir / | ||
cd /var/www | cd /var/www | ||
chmod 750 lets_encrypt | chmod 750 lets_encrypt | ||
- | chown www-data. lets_encrypt | + | chgrp www-data lets_encrypt |
- | cd lets_encrypt | + | |
- | cp / | + | |
- | chmod 740 acme_tiny.py | + | |
</ | </ | ||
- Account-Schlüssel anlegen< | - Account-Schlüssel anlegen< | ||
+ | cd / | ||
openssl genrsa 2048 > account.key | openssl genrsa 2048 > account.key | ||
chmod 400 account.key | chmod 400 account.key | ||
</ | </ | ||
- Domainschlüssel anlegen< | - Domainschlüssel anlegen< | ||
- | openssl genrsa 2048 > < | + | openssl genrsa 2048 > / |
- | chmod 640 < | + | chmod 640 / |
</ | </ | ||
- | - CSR erstellen< | + | - SAN-Konfiguration |
- | openssl req -new -sha256 -key < | + | |
- | chmod 640 < | + | |
- | </ | + | |
[req] | [req] | ||
distinguished_name = req_distinguished_name | distinguished_name = req_distinguished_name | ||
Zeile 36: | Zeile 30: | ||
[req_distinguished_name] | [req_distinguished_name] | ||
- | CN = www.piratenfraktion-sh.de | + | CN = www.example.com |
[v3_req] | [v3_req] | ||
Zeile 46: | Zeile 40: | ||
DNS.3 = sub.www.example.com | DNS.3 = sub.www.example.com | ||
</ | </ | ||
+ | - CSR erstellen< | ||
+ | openssl req -new -sha256 -key / | ||
+ | -subj "/ | ||
+ | chmod 640 < | ||
+ | </ | ||
- Prüfe, ob der CSR korrekten Inhalt hat< | - Prüfe, ob der CSR korrekten Inhalt hat< | ||
openssl req -in < | openssl req -in < | ||
Zeile 52: | Zeile 51: | ||
mkdir challenges | mkdir challenges | ||
chmod 750 challenges | chmod 750 challenges | ||
- | chown www-data. challenges | + | chgrp www-data challenges |
</ | </ | ||
* Lighttpd:< | * Lighttpd:< | ||
Zeile 60: | Zeile 59: | ||
url.redirect = ( | url.redirect = ( | ||
" | " | ||
- | " | + | " |
) | ) | ||
} | } | ||
Zeile 81: | Zeile 80: | ||
} | } | ||
</ | </ | ||
- | - Webserver neu laden | ||
- | * Apache: ''/ | ||
- Zertifikat anfordern< | - Zertifikat anfordern< | ||
- | acme-tiny --account-key account.key --csr < | + | acme-tiny --account-key account.key --csr < |
chmod 640 < | chmod 640 < | ||
- | cp -p < | ||
</ | </ | ||
- | - Intermediate | + | - Zertifikat an Zielposition ablegen< |
- | wget -O - https:// | + | |
- | cat intermediate.pem >> < | + | |
- | </ | + | |
- | - Zertifikat ind Schlüssel | + | |
cp -p < | cp -p < | ||
- | cp -p < | ||
</ | </ | ||
- Anschließend Zertifikat und Schlüssel im der entsprechenden Webserverkonfiguration einbauen | - Anschließend Zertifikat und Schlüssel im der entsprechenden Webserverkonfiguration einbauen | ||
+ | - Webserver neu laden | ||
+ | * Apache: ''/ | ||
+ | * Nginx: ''/ | ||
+ | |||
===== Überprüfung ===== | ===== Überprüfung ===== | ||
Zeile 109: | Zeile 104: | ||
- Erneuertes Zertifikat anfordern< | - Erneuertes Zertifikat anfordern< | ||
- | ./acme_tiny.py | + | cd /var/www/lets_encrypt |
+ | acme-tiny | ||
chmod 640 < | chmod 640 < | ||
</ | </ | ||
- | - Intermediate Zertifikat holen und anfügen< | + | - ggf. Intermediate Zertifikat holen und anfügen< |
wget -O - https:// | wget -O - https:// | ||
cat intermediate.pem >> < | cat intermediate.pem >> < | ||
</ | </ | ||
- Zertifikat ind Schlüssel an Zielposition ablegen< | - Zertifikat ind Schlüssel an Zielposition ablegen< | ||
- | cp < | + | cp -p < |
</ | </ | ||
- Neuladen der Serverkonfiguration< | - Neuladen der Serverkonfiguration< |
lets_encrypt.1609490008.txt.gz · Zuletzt geändert: 01.01.2021 08:33 von thooge